mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-21 09:31:17 -08:00
implement language detection configuration for i18next
This commit is contained in:
1 file changed
+8
@@ -18,6 +18,14 @@ i18n
|
||||
// init i18next
|
||||
// for all options read: https://www.i18next.com/overview/configuration-options
|
||||
.init<HttpBackendOptions>({
|
||||
// Prefer the browser / navigator language and avoid using cached localStorage value
|
||||
detection: {
|
||||
// prefer querystring first (e.g. ?lng=de), then navigator, then html tag, path, subdomain
|
||||
order: ['querystring', 'navigator', 'htmlTag', 'path', 'subdomain'],
|
||||
lookupQuerystring: 'lng',
|
||||
// do not cache the detected language in localStorage to avoid stale overrides
|
||||
caches: [],
|
||||
},
|
||||
debug: false,
|
||||
fallbackLng: 'en',
|
||||
interpolation: {
|
||||
|
||||
Reference in new issue
Block a user