Changing the language
Set the site language in docsforge.yml. This affects search stemming, typography (e.g., Chinese justification), and RTL layout.
Configuration
extra:
alternate:
- name: English
link: /
lang: en
- name: 中文
link /zh/
lang: zh
Or for a single language site, the language is primarily configured via the theme:
theme:
language: en
Supported languages
DocsForge (via the Material theme) supports 60+ languages:
en— Englishzh— Chinese (Simplified)zh-Hant— Chinese (Traditional)ja— Japaneseko— Koreande— Germanfr— Frenches— Spanishpt— Portuguesept-BR— Portuguese (Brazil)it— Italianru— Russianar— Arabichi— Hindi- And 50+ more
Search language
Search stemming is language-aware. The search plugin automatically uses the configured language:
plugins:
- search:
lang:
- en
- de
Multiple languages can be specified for multilingual search.
Right-to-left (RTL) support
For Arabic, Hebrew, and other RTL languages, DocsForge automatically adjusts layout direction when the language is set:
theme:
language: ar
Custom translations
You can override individual translation strings:
extra:
social:
- icon: fontawesome/brands/github
link: https://github.com/username/repo
Or create a custom translation file in docs/locales/xx/LC_MESSAGES/messages.po.