This commit is contained in:
josc146
2023-05-18 19:25:13 +08:00
parent 00257f2e68
commit 75075d6483
11 changed files with 154 additions and 9 deletions

View File

@@ -0,0 +1,13 @@
import i18n, {changeLanguage} from 'i18next';
import {initReactI18next} from 'react-i18next';
import {resources} from './resources';
import {getNavigatorLanguage} from '../utils';
i18n.use(initReactI18next).init({
resources,
interpolation: {
escapeValue: false // not needed for react as it escapes by default
}
}).then(() => {
changeLanguage(getNavigatorLanguage());
});