-
Notifications
You must be signed in to change notification settings - Fork 990
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting default_language takes no effect #1615
Comments
The rendering should be language aware. Eg if you're rendering a en page, it will give you the en title. If you are rendering a fr page, it will give the fr title. |
I got this, but what about I suppose if I render with
But in fact I got:
|
Can you push a very basic repo so I can have a look? |
|
Same problem as #1634 |
Bug Report
Environment
Zola version:
v0.14.1 (also apply to current
next
branch)Expected Behavior
(In fact I'm a little confused about what's the expected behaviour for zola here. I read the doc and some similiar issues like #1512 but still cannot figure it out.)
I suppose setting
default_language
inconfig.toml
will make__tera_context.config.title
to be[languages.<default_language>.title]
.Current Behavior
It seems zola always prefer translations under
en
.Step to reproduce
In my
templates/index.html
:In
config.toml
:All other files are untouched after
zola init
.Serve with
zola serve
, the result islanguages.en.title
.Some behaviour in other situations:
__tera_context.config.title
is null), is it a regression bug Incorrect values in__tera_context
#1512 ?[languages.en]
, ie.languages.en.title
, no matter what valuedefault_language
is or other languages configuations added.The text was updated successfully, but these errors were encountered: