Spaces:
Running
Running
Download src/i18n.js from DanilDrotik/FlowWeb: direct link, hf CLI and curl.
- Browser
- Download file 512 Bytes
-
https://huggingface.co/spaces/DanilDrotik/FlowWeb/resolve/main/src/i18n.js
- Command line
-
hf download hf://spaces/DanilDrotik/FlowWeb/src/i18n.js
-
curl -L -o i18n.js https://huggingface.co/spaces/DanilDrotik/FlowWeb/resolve/main/src/i18n.js
512 Bytes
| import i18n from 'i18next'; | |
| import { initReactI18next } from 'react-i18next'; | |
| import enTranslation from './locales/en.json'; | |
| import ukTranslation from './locales/uk.json'; | |
| const savedLanguage = localStorage.getItem('language') || 'en'; | |
| i18n | |
| .use(initReactI18next) | |
| .init({ | |
| resources: { | |
| en: { translation: enTranslation }, | |
| uk: { translation: ukTranslation } | |
| }, | |
| lng: savedLanguage, | |
| fallbackLng: 'en', | |
| interpolation: { | |
| escapeValue: false | |
| } | |
| }); | |
| export default i18n; | |