diff --git a/README.md b/README.md index 705dce9..0d59c26 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ The [old branch](https://github.com/frjo/hugo-theme-zen/tree/old) has the origin ## Sites using the Hugo Zen theme -* [Combonetwork development](https://combonet.se/) +* [Combonetwork development](https://combonet.se/) (multilingual) * [Drejargården](https://www.drejargarden.se/) * [Helmer Grundström](https://www.helmergrundstrom.se/) * [xdeb.org](https://xdeb.org/) @@ -96,6 +96,27 @@ params: ``` +## Multilingual + +English and Swedish translations are included and you can easily add more to the `i18n` site directory. + +A language selector will be included on sites with more than one language. Add a `LanguageName` parameter to your language configuration, this is what will be displayed in the selector. + +The language selector will link to a translation of the current page if it exist and to the front page if it does not. + +``` +languages: + sv: + weight: 1 + params: + LanguageName: "Svenska" + en: + weight: 2 + params: + LanguageName: "English" +``` + + ## Contact form If your server support php with the mail() command (very common) you can use the included contact form feature to get a contact form for your site. diff --git a/layouts/partials/language-selector.html b/layouts/partials/language-selector.html index 6ea49c1..c60186f 100644 --- a/layouts/partials/language-selector.html +++ b/layouts/partials/language-selector.html @@ -1,21 +1,16 @@