mirror of https://github.com/lxndrblz/anatole.git

Alexander Bilz
06.59.2020 7d3e357e0a962e062c982cbcd4fa525f62d3e1d8
Added additional description on how to use the multilingual mode

Closes #52
1 files modified
8 ■■■■■ changed files
README.md 8 ●●●●● patch | view | raw | blame | history
README.md
@@ -99,6 +99,14 @@
  weight = 2
  LanguageName = "DE"
```
There are two ways of translating your content either by adding a suffix in the filename eg. `mypost.de.md` or by setting a contentDir (a certain directory) for each language. [Link to the Hugo documentation](https://gohugo.io/content-management/multilingual/). If you want to use the option with the `contentDir`, you will have to add the `contentDir` parameter for each language:
```toml
[languages]
  [languages.en]
    contentDir = "content/english"
    languageName = "EN"
    weight = 1
```
To make sure your menu is linking to the correct localized content, make sure that you customize the menu items to inlude the language prefix. Your menu might look like the following:
```toml
[[Languages.de.menu.main]]