mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(i18n): default interface language to english
This commit is contained in:
@@ -2,6 +2,7 @@ import i18next from 'i18next';
|
||||
import HttpBackend from 'i18next-http-backend';
|
||||
import LanguageDetector from 'i18next-browser-languagedetector';
|
||||
import { initReactI18next } from 'react-i18next';
|
||||
import { DEFAULT_INTERFACE_LANGUAGE, INTERFACE_LANGUAGE_STORAGE_KEY, SUPPORTED_INTERFACE_LANGUAGES } from './constants';
|
||||
|
||||
const loadPath = `./translations/{{lng}}/{{ns}}.json`;
|
||||
|
||||
@@ -10,44 +11,13 @@ i18next
|
||||
.use(LanguageDetector)
|
||||
.use(initReactI18next)
|
||||
.init({
|
||||
fallbackLng: 'en',
|
||||
supportedLngs: [
|
||||
'ar',
|
||||
'bn',
|
||||
'cs',
|
||||
'da',
|
||||
'de',
|
||||
'el',
|
||||
'en',
|
||||
'es',
|
||||
'fa',
|
||||
'fi',
|
||||
'fil',
|
||||
'fr',
|
||||
'he',
|
||||
'hi',
|
||||
'hu',
|
||||
'id',
|
||||
'it',
|
||||
'ja',
|
||||
'ko',
|
||||
'mr',
|
||||
'nl',
|
||||
'no',
|
||||
'pl',
|
||||
'pt',
|
||||
'ro',
|
||||
'ru',
|
||||
'sq',
|
||||
'sv',
|
||||
'te',
|
||||
'th',
|
||||
'tr',
|
||||
'uk',
|
||||
'ur',
|
||||
'vi',
|
||||
'zh',
|
||||
],
|
||||
fallbackLng: DEFAULT_INTERFACE_LANGUAGE,
|
||||
supportedLngs: [...SUPPORTED_INTERFACE_LANGUAGES],
|
||||
detection: {
|
||||
order: ['localStorage'],
|
||||
caches: ['localStorage'],
|
||||
lookupLocalStorage: INTERFACE_LANGUAGE_STORAGE_KEY,
|
||||
},
|
||||
|
||||
ns: ['default'],
|
||||
defaultNS: 'default',
|
||||
|
||||
Reference in New Issue
Block a user