feat(i18n): add i18n on server side
- remove the hardcoded list of locales in favor of a discovry on start time
- server will stop on badly formatted locale .json
- add server.* entries for serer side translation
server side translation will be used for templating and email
note: no json in some embded html (like in /magic), amount of work was similar
This commit is contained in:
+25
@@ -416,6 +416,31 @@ OXICLOUD_WOPI_ENABLED=false
|
||||
# IdP is the security boundary and may enforce MFA we shouldn't bypass.
|
||||
#OXICLOUD_MAGIC_LINK_OPEN_TO_PASSWORD_USERS=false
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# INTERNATIONALIZATION (server-rendered surfaces)
|
||||
# -----------------------------------------------------------------------------
|
||||
#
|
||||
# Default locale for server-rendered HTML pages and outbound emails when
|
||||
# no stronger signal is available. The resolution priority is:
|
||||
#
|
||||
# HTML pages (anonymous, e.g. magic-link landing):
|
||||
# 1. ?lang=xx query override
|
||||
# 2. browser Accept-Language header (q-weighted)
|
||||
# 3. this default
|
||||
#
|
||||
# Emails to a known user:
|
||||
# 1. user.preferred_locale column
|
||||
# 2. this default
|
||||
#
|
||||
# Supported locales are discovered at boot by listing static/locales/*.json,
|
||||
# so adding a 17th locale is a file-drop operation (no rebuild required).
|
||||
# This variable must match one of the discovered codes — startup fails fast
|
||||
# if you set OXICLOUD_DEFAULT_LOCALE=xx and no static/locales/xx.json exists.
|
||||
#
|
||||
# Default: "en". Today's shipped locales: ar, de, en, es, fa, fr, hi, it,
|
||||
# ja, ko, nl, pl, pt, ru, zh, zh-TW.
|
||||
#OXICLOUD_DEFAULT_LOCALE=en
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# PROXY
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user