mirror of
https://github.com/streamyfin/streamyfin.git
synced 2025-08-20 18:37:18 +02:00
wip
This commit is contained in:
22
i18n.ts
Normal file
22
i18n.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import i18n from "i18next";
|
||||
import { initReactI18next } from "react-i18next";
|
||||
|
||||
import en from "./translations/en.json";
|
||||
import sv from "./translations/sv.json";
|
||||
import { getLocales } from "expo-localization";
|
||||
|
||||
i18n.use(initReactI18next).init({
|
||||
compatibilityJSON: "v3",
|
||||
resources: {
|
||||
en: { translation: en },
|
||||
sv: { translation: sv },
|
||||
},
|
||||
|
||||
lng: getLocales()[0].languageCode || "en",
|
||||
fallbackLng: "en",
|
||||
interpolation: {
|
||||
escapeValue: false,
|
||||
},
|
||||
});
|
||||
|
||||
export default i18n;
|
||||
Reference in New Issue
Block a user