Skip to content
Snippets Groups Projects
Select Git revision
  • 9dcc6ef498b8eb5a7ac722db66f9cea9f5310ac6
  • main default protected
  • export
  • 28-conversion-tests
  • extraction
  • exploration
  • exploration-old
  • 2-encoding-fix
  • main-old
9 results

mcli

Blame
  • i18n.js 467 B
    import i18n from 'i18next';
    import { reactI18nextModule } from 'react-i18next';
    import de from '../locales/de/translation.json';
    import en from '../locales/en/translation.json';
    
    
    // Load translations for each language
    const resources = {
      de,
      en,
    };
    
    i18n
      .use(reactI18nextModule)
      .init({
        resources,
        lng: 'en',
        fallbackLng: 'en',
    
        interpolation: {
          escapeValue: false, // react is already safe from xss
        },
      });
    
    export default i18n;