2023-02-13 20:20:08 +03:30
|
|
|
/*
|
|
|
|
|
* 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
|
2023-05-18 13:17:41 +02:00
|
|
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
|
|
|
*/
|
2023-02-13 20:20:08 +03:30
|
|
|
|
|
|
|
|
import { use } from 'i18next';
|
|
|
|
|
import { initReactI18next } from 'react-i18next';
|
|
|
|
|
import LanguageDetector from 'i18next-browser-languagedetector';
|
2023-06-05 01:42:39 +02:00
|
|
|
import resources from '@/i18n/translations';
|
2023-02-13 20:20:08 +03:30
|
|
|
|
|
|
|
|
const i18n = use(initReactI18next)
|
|
|
|
|
.use(LanguageDetector)
|
|
|
|
|
.init({
|
|
|
|
|
resources,
|
|
|
|
|
|
|
|
|
|
fallbackLng: 'en',
|
|
|
|
|
interpolation: {
|
|
|
|
|
escapeValue: false,
|
|
|
|
|
},
|
2023-02-14 16:28:37 +03:30
|
|
|
returnNull: false,
|
|
|
|
|
debug: process.env.NODE_ENV !== 'production',
|
2023-02-13 20:20:08 +03:30
|
|
|
});
|
|
|
|
|
|
|
|
|
|
export default i18n;
|