```
{{ i18n "home" }}
```
+
This uses a definition like this one in `i18n/en-US.yaml`:
+
```
- id: home
translation: "Home"
```
{{ i18n "wordCount" . }}
```
+
This uses a definition like this one in `i18n/en-US.yaml`:
+
```
- id: wordCount
translation: "This article has {{ .WordCount }} words."
```
+
To track down missing translation strings, run Hugo with the `--i18n-warnings` flag:
```bash
```
+
### Menus
You can define your menus for each language independently. The [creation of a menu]({{< relref "extras/menus.md" >}}) works analogous to earlier versions of Hugo, except that they have to be defined in their language-specific block in the configuration file:
```
+An empty string will be shown if the translation for the current language is missing and no default value is set.
+
+While translating a Hugo website it can be handy to have a visual indicator as well. The `EnableMissingTranslationPlaceholders` config option allows you to replace the empty string with a placeholder like `[i18n] identifier`, where `identifier` is the id of the missing translation.
+
+**Remember: Hugo will generate your website with these placeholders. It might not be suited for production environments.**
+
+
### Multilingual Themes support
To support Multilingual mode in your themes, some considerations must be taken for the URLs in the templates. If there are more than one language, URLs must either come from the built-in `.Permalink` or `.URL`, be constructed with `relLangURL` or `absLangURL` template funcs -- or prefixed with `{{.LanguagePrefix }}`.
# Enable Emoji emoticons support for page content.
# See www.emoji-cheat-sheet.com
enableEmoji: false
+ # Show a placeholder like "[i18n] foo" instead of an empty string if a translation is missing
+ enableMissingTranslationPlaceholders: false
footnoteAnchorPrefix: ""
footnoteReturnLinkContents: ""
# google analytics tracking id
viper.SetDefault("CurrentContentLanguage", helpers.NewDefaultLanguage())
viper.SetDefault("DefaultContentLanguage", "en")
viper.SetDefault("DefaultContentLanguageInSubdir", false)
+ viper.SetDefault("EnableMissingTranslationPlaceholders", false)
}