This theme is translatable. So you can change the default language from the config/_default/config.toml
file. We provided two languages, English and Spanish. But you can add as many languages as you want.
For maintaining languages, you need to open the config/_defaults/languages.toml
file and follow the steps below.
- Language is a loop item. So you can duplicate it as many times as you want. Then change the name of the language. See Official Docs for more information.
- languageName is the name of the language.
- languageCode is the code of the language. You can get your language code from the ISO 639-1 or ISO 639-2 codes.
- contentDir is the directory where the content of the language is stored. For example, if you want to create a Spanish language, you need to create a directory called
content/spanish
. - weight is the weight of the language. Smaller weight will be the first language.
Example Code
######## English language ##########
[en]
languageName = "En"
languageCode = "en-us"
contentDir = "content/english"
weight = 1
######## Spanish language ##########
[[es]
languageName = "Es"
languageCode = "es-CO"
contentDir = "content/spanish"
weight = 2