Language Configuration
By default the BookStack interface is shown in English. Additional languages are supported by the wider BookStack community. English translations may show as a fallback if a chosen alternative language does not have fully up-to-date translations.
Setting the Default Language
The value of the APP_LANG variable needs to be a valid locale code
The default language will be used as the default for logged-in users and also for
public users if their language cannot be auto-detected. This can be set
in your .env file as follows:
# Sets application language to French
APP_LANG=fr
The value of the APP_LANG variable must be a valid locale code matching one of the following options:
- Arabic -
ar - Basque -
eu - Bosnian -
bs - Bulgarian -
bg - Catalan -
ca - Chinese (Simplified) -
zh_CN - Chinese (Traditional) -
zh_TW - Croatian -
hr - Czech -
cs - Danish -
da - Dutch -
nl - English -
en - French -
fr - German (Formal) -
de - German (Informal) -
de_informal - Hebrew -
he - Hungarian -
hu - Indonesian -
id - Italian -
it - Japanese -
ja - Korean -
ko - Latvian -
lv - Lithuanian -
lt - Norwegian Bokmal -
nb - Persian -
fa - Polish -
pl - Portuguese -
pt_PT - Brazilian Portuguese -
pt_BR - Russian -
ru - Slovak -
sk - Slovenian -
sl - Spanish -
es - Argentinian Spanish -
es_AR - Swedish -
sv - Turkish -
tr - Ukrainian -
uk - Vietnamese -
vi
Public User Locale Autodetection
For users that are not logged-in BookStack will try to detect their language
based off of information sent from their browser. If you'd prefer to force
the language seen to be the APP_LANG setting you can set the following
in your .env file:
APP_AUTO_LANG_PUBLIC=false
Localised Date Formatting
BookStack does support the localisation of date formats but it does depend on the intended locales being installed on the host system. If using ubuntu, you can manage installed locales via the command:
sudo dpkg-reconfigure locales
For other operating systems this may be different. After installing new locales you may need to restart any running PHP processes. For example, On Ubuntu, running PHP 7.4:
sudo systemctl restart php7.4-fpm.service
📖 来源:BookStack 官方文档· 作者:Dan Brown 与 BookStack 贡献者 · 许可:MIT· 同步自上游提交593d308(2024-01-17)· 改动:仅格式转换
本页由 cocobook 外部书同步自动生成,此处只读;要修改请到菲码书稿仓CocoBook/external-books的 overlay 目录提合并请求。