HUGO

Multilingual site using page bundles

Hi all,

I’m trying to create a multilingual site with each page being a page bundle. My understanding is that for a page bundle, ‘index.md’ is meant to be written in the default language (in my case: English) and then there are additional Markdown files for other languages, e.g. ‘index.de.md’ for German.

However, in my experiments, it seems that the first ‘index*.md’ file in alphabetical order is used by default. I.e. ‘index.de.md’ is preferred over ‘index.md’ so the ‘default’ page is German. Is this by design, or did I maybe just misunderstand how this is meant to work?

I read the GitHub issue you created, and was able to reproduce the behavior you describe. However, the documentation states:

You should define the available languages in a languages section in your site configuration.

So, with your example, if I add this to config.toml I get the expected results:

[languages]
[languages.de]
[languages.en]

Ah, indeed - thanks a lot for pointing this out!

I totally missed that part in the documentation. It now works as expected. :slight_smile:

Excellent. Please close the GitHub issue.

Will do, once GitHub is up again. :slight_smile:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.