Files
vkv/resources/js/i18n.ts
Zdeněk Burda 41e3ce6f25 Initial commit
2026-01-09 21:26:40 +01:00

32 lines
666 B
TypeScript

import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
const htmlLang = document.documentElement.lang || 'en';
const initialLang = htmlLang.split('-')[0];
i18n
.use(initReactI18next)
.init({
lng: initialLang,
fallbackLng: 'en',
interpolation: {
escapeValue: false,
},
resources: {
en: {
common: await import('./locales/en/common.json'),
},
cs: {
common: await import('./locales/cs/common.json'),
},
},
ns: ['common', 'ruleset'],
defaultNS: 'common',
});
export default i18n;
// mnozne cislo
//t('qso_count', { count: 1 });
//t('qso_count', { count: 5 });