Skip to content
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

Rework the multilingual page #1448

Closed
jmooring opened this issue May 3, 2021 · 2 comments
Closed

Rework the multilingual page #1448

jmooring opened this issue May 3, 2021 · 2 comments

Comments

@jmooring
Copy link
Member

jmooring commented May 3, 2021

https://gohugo.io/content-management/multilingual/#missing-translations

If a string does not have a translation for the current language, Hugo will use the value from the default language.

No, it will not. For example, if french is the default language, and a translation is defined in fr.toml but not in en.toml, then nothing will be shown on the english page. However, if french is the default language, and a translation is defined in en.toml but not in fr.toml, the english translation will be shown on the french page.

If no default value is set, an empty string will be shown.

I'm not sure how one would set a default value, and empty strings are, by definition, never shown.

@LHSnow
Copy link

LHSnow commented Jan 18, 2023

Also, if the language is 'en' in the hugo config, a translation file named en_US.toml in /i18n/ does not get considered. A file named en.toml does, however, so the only example that is correct regarding file naming in the docs is fr.toml. It does not seem to matter if the language is instead named 'en_US' in the config, either.

@jmooring
Copy link
Member Author

jmooring commented Jun 1, 2023

Closing in favor of #2099.

@jmooring jmooring closed this as completed Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants