Translation Support
Table of Contents
With Hugo i18n possibilities, you can easily have a website in your language. This Hugo theme is ready to be translated into other languages. You can create a special file that contains translated text to show the visitor instead of English.
Translating the Theme
- Create a folder named
/i18n/in your Hugo site’s root - Create a file
<LANG-CODE>.yamlinside/i18nfolder. Language files<LANG-CODE>.yamlshould be named according to RFC 5646 with names such asen-US.yaml,fr.yaml,de.yaml, etc. - Copy a reference template to your translation from
<THEME>/i18n/en.yamlfile - Translate all available
translationstrings into chosen language
For example, to create German translation, create a file /i18n/de.yaml in the folder of your Hugo site, copy reference template from <THEME>/i18n/en.yaml file and translate all available translation strings.
Changing Site Language in Hugo
To use the translations, just set a correct value for defaultContentLanguage in site config file:
defaultContentLanguage = "en" # de / fr / other lang code...In other words, this field determines which i18n file to use.
Contributing Translation
If you want to upload your translation in the theme master repository, feel free to create a pull request.
