PureWiki supports multilingual wikis through a built-in internationalization (i18n) system. Each page can have language-specific versions stored alongside the default content file. Routing, caching, search indexing, and the sitemap are all language-aware.
Configuration
Multilingual support is configured in the global settings dashboard under the General tab. The following options are available:
- Enable i18n – Activates language routing and multilingual page handling.
- Default Language – The language code for the primary content (e.g.
de). Pages in this language are served without a URL prefix. - Supported Languages – A list of additional language codes (e.g.
en,fr). Each language is accessible via its URL prefix.
File Structure
Each language version is stored as a separate JSON file within the page directory:
pages/
my-page/
page.json ← default language (e.g. German)
page.en.json ← English translation
page.draft.en.json ← English draft
page.json. Translation files follow the pattern page.{lang}.json.URL Routing
The default language is served at the clean URL without a prefix. Additional languages are accessed via their language code as a URL prefix:
/my-page → default language (e.g. German)
/en/my-page → English version
If a visitor accesses a URL with the default language prefix (e.g. /de/my-page), they are automatically redirected (301) to the clean URL (/my-page) to avoid duplicate content.
Editing Translations
In the dashboard editor, a language dropdown is shown when i18n is enabled. Languages for which a translation already exists are visually highlighted. Switching language loads the corresponding content file. If no translation exists yet, a new one can be created from within the editor.
SEO
When i18n is active, the sitemap at /sitemap.xml automatically includes hreflang alternate tags for each page and language combination. This helps search engines correctly index and serve language-specific content.