This commit is contained in:
Aria Moradi
2023-02-13 20:20:08 +03:30
parent aaedbb7be9
commit 1c7c3e566c
8 changed files with 107 additions and 4 deletions

25
src/i18n/index.ts Normal file
View File

@@ -0,0 +1,25 @@
/*
* Copyright (C) Contributors to the Suwayomi project
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
import { use } from 'i18next';
import { initReactI18next } from 'react-i18next';
import resources from 'i18n/translations';
import LanguageDetector from 'i18next-browser-languagedetector';
const i18n = use(initReactI18next)
.use(LanguageDetector)
.init({
resources,
fallbackLng: 'en',
interpolation: {
escapeValue: false,
},
debug: true,
});
export default i18n;