[RFC] i18n


You are using a theme so that depends what the theme index page is displaying.
If you want to experiment, skip the theme and write the templates directly in the templates/ directory (you can copy the ones from your theme if you want).

1 Like

Gotcha. Thanks.

Is it possible to do something like {% set section = get_section(path="_index.md") %} but having it use _index.md or _index.en.md automatically?

I’m assuming I need to use get_section in my index.html to serve _index.md or _index.en.md depending of the language.


Not right now.

You don’t necessarily need that. Look at the test i18n site index page: https://github.com/getzola/zola/blob/next/test_site_i18n/templates/index.html
It will be generated correctly for all languages automatically as it only uses the section variable that is passed down in all cases.


The plan is to release v0.6.0 with what is currently on the next branch this weekend. It is missing things but we will get more feedback on multilingual if it is actually released and I don’t think the fundamental structure will change.

Any big blocker/bad design to consider before that?

1 Like

With i18n, is a translations file supported yet? I.e. something like Fluent where I can easily grab a translation.

Currently I can theoretically make a base template with a ton of blocks, but that sounds like a big headache to maintain and still has code duplication.


Not yet! The i18n support currently in is a first step, about translating the content.
As mentioned above, I wasn’t sure people wanted full-on i18n translations for templates so I left it out for now.
Adding fluent is definitely planned for later imo, I was just waiting for more feedback on Zola multi lingual story beforehand.


Ah I see. I’ve been working on porting over my existing site to one that has English/Korean translations, but to do so currently I have to duplicate everything, or use the mentioned method above. If an i18n translations file or files were to be supported it would be really nice.