Wiki.js offers strong multi-language capabilities:
Tip
The term language refers to the written words / grammars, while the term locale refers to the cultural differences in formatting, presentation and conventions.
For example, Portuguese (pr) is a language which has some differences depending on whether you're in Portugal (pr-PT) or Brazil (pr-BR), which are locales.By default, only the language code is used, unless a language has more than 2 locales, in which case the variant is appended to the language code.
From the Administration Area, click the Locale menu item from the sidebar.
| Parameter | Description |
|---|---|
| Primary Locale | The locale to use as default / fallback for this site. |
| Force Locale Prefix | Paths without a locale code will always be redirected to the primary locale. More details. |
| Show Locale Menu | Display a locale selector in the sidebar, so visitors can switch to another active locale. |
Note
The locale settings are per site. For example, one site could be strictly in English while another is available in 5 different languages.
When this option is enabled, a user loading the homepage of a wiki site (e.g. https://wiki.example.org/) will automatically be redirected to https://wiki.example.org/en/ if the primary locale is English. When off, the locale prefix is optional (both / and /en/ will work without any redirects).
When using multiple locales, extra care needs to be taken with your storage targets configuration. Ensure to enable "Add Locale Prefix" option so that all content from different locales are stored in their distinct subdirectory. Otherwise only the primary locale will be stored and directly at the root.
The English locale is included by default in Wiki.js.
You can fetch the latest list of locales by clicking the Fetch Locales button in the top-right corner of the page. This will download the list of available locales and updates for any installed locales.
To install a new locale, click the Install button next to the desired locale to install it. It can then be activated in the Active Locales section.
In order to set a custom name and short code for a locale, click the button next to the desired locale.
This is useful in scenarios where you're using a single locale for a language with multiple variants. For example, you may want to only use Portuguese Brazil (pr-BR) and have it shown as just Portuguese (pr).
Important
Locales custom name and short codes are global to the wiki.
You can contribute new locales or improve existing ones. Read more on how to contribute, no coding experience needed.