Files
TorrServerJellyfin/web/src/i18n.js
西行寺鬼鬼子 64743af2ce Added Simplified Chinese translation (#268)
* Added Simplified Chinese translation

* Add the missing switch

* Improve Simplified Chinese translation
2023-06-03 15:59:58 +03:00

24 lines
825 B
JavaScript

import i18n from 'i18next'
import { initReactI18next } from 'react-i18next'
import LanguageDetector from 'i18next-browser-languagedetector'
import translationEN from 'locales/en/translation.json'
import translationRU from 'locales/ru/translation.json'
import translationUA from 'locales/ua/translation.json'
import translationZH from 'locales/zh/translation.json'
i18n
.use(LanguageDetector)
.use(initReactI18next)
.init({
fallbackLng: 'en', // default language will be used if none of declared lanuages detected (en, ru)
interpolation: { escapeValue: false }, // react already safes from xss
resources: {
en: { translation: translationEN },
ru: { translation: translationRU },
ua: { translation: translationUA },
zh: { translation: translationZH }
},
})
export default i18n