Files
Psychotoxical-psysonic/src/i18n.ts
T
Kveld. 8f18f73b33 feat(i18n): add Spanish (es) translation
Adds complete Spanish locale with 964 translated strings. Registered in i18n.ts, added to language dropdown in Settings. 8 languages total.
2026-04-12 11:25:54 +02:00

39 lines
1.1 KiB
TypeScript

import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import { deTranslation } from './locales/de';
import { enTranslation } from './locales/en';
import { frTranslation } from './locales/fr';
import { zhTranslation } from './locales/zh';
import { nbTranslation } from './locales/nb';
import { ruTranslation } from './locales/ru';
import { nlTranslation } from './locales/nl';
import { esTranslation } from './locales/es';
const savedLanguage = localStorage.getItem('psysonic_language') || 'en';
i18n
.use(initReactI18next)
.init({
resources: {
en: { translation: enTranslation },
de: { translation: deTranslation },
es: { translation: esTranslation },
fr: { translation: frTranslation },
nl: { translation: nlTranslation },
zh: { translation: zhTranslation },
nb: { translation: nbTranslation },
ru: { translation: ruTranslation },
},
lng: savedLanguage,
fallbackLng: 'en',
interpolation: {
escapeValue: false,
},
});
i18n.on('languageChanged', lng => {
localStorage.setItem('psysonic_language', lng);
});
export default i18n;