mirror of
https://github.com/gnmyt/myspeed.git
synced 2026-05-08 05:00:34 -05:00
Moved the i18n system into its own i18n file
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import i18n from "i18next";
|
||||
import {initReactI18next} from "react-i18next";
|
||||
import LanguageDetector from 'i18next-browser-languagedetector';
|
||||
import HttpApi from 'i18next-http-backend';
|
||||
|
||||
await i18n.use(initReactI18next).use(LanguageDetector).use(HttpApi).init({
|
||||
supportedLngs: ['en', 'de'],
|
||||
fallbackLng: 'en',
|
||||
backend: {
|
||||
loadPath: '/locales/{{lng}}.json'
|
||||
},
|
||||
detection: {
|
||||
order: ['localStorage', 'htmlTag'],
|
||||
lookupLocalStorage: 'language'
|
||||
}
|
||||
});
|
||||
|
||||
export default i18n;
|
||||
Reference in New Issue
Block a user