diff --git a/exampleSite/content/docs/multilingual/content.md b/exampleSite/content/docs/multilingual/content.md index 14a0cf83..0c7784e5 100644 --- a/exampleSite/content/docs/multilingual/content.md +++ b/exampleSite/content/docs/multilingual/content.md @@ -23,16 +23,18 @@ for German website if those pages are not translated to German. For more information on Hugo's Multilingual mode, please refer to [their documentation](https://gohugo.io/content-management/multilingual/). In order to configure two languages, you need to update your main your -configuration. Here's an example from the official documentation: +configuration. Here's an example, derived from the official documentation: ``` DefaultContentLanguage = "en" [languages] [languages.en] + languageName = "English" title = "My blog" weight = 1 [languages.fr] + languageName = "Français" title = "Mon blogue" weight = 2 @@ -40,6 +42,9 @@ DefaultContentLanguage = "en" ... ``` +The `languageName` parameter is used as text on the language switcher buttons +in the navbar. + Please note that these parameters are added outside of `params` variable, inside your configuration file (`config.toml`, `config.yaml`, `config.json`). This will let Hugo know that there are two languages for this project and the default diff --git a/layouts/partials/fragments/nav.html b/layouts/partials/fragments/nav.html index 6d5db276..b0979d9a 100644 --- a/layouts/partials/fragments/nav.html +++ b/layouts/partials/fragments/nav.html @@ -36,7 +36,7 @@ {{- else -}} {{- printf " justify-content-end " -}} {{- end -}} collapse show" id="navbarCollapse"> -