diff --git a/src/i18n.js b/src/i18n.js index 5be59afe..71933227 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -6,12 +6,14 @@ import sl from './locales/sl.json'; import it from './locales/it.json'; import hr from './locales/hr.json'; import hu from './locales/hu.json'; +import de from './locales/de.json'; export const languages = [ - { name: 'English', code: 'en' }, { name: 'Slovenščina', code: 'sl' }, - { name: 'Italiano', code: 'it' }, + { name: 'Deutsch', code: 'de' }, + { name: 'English', code: 'en' }, { name: 'Hrvatski', code: 'hr' }, + { name: 'Italiano', code: 'it' }, { name: 'Magyar', code: 'hu' }, ]; @@ -28,9 +30,10 @@ i18next it: { translation: it }, hr: { translation: hr }, hu: { translation: hu }, + de: { translation: de }, }, lng: process.env.REACT_APP_DEFAULT_LANGUAGE, // if you're using a language detector, do not define the lng option - fallbackLng: languages.map(value => value.code), + fallbackLng: ['en', 'sl'], // https://www.i18next.com/principles/fallback#fallback-to-different-languages detection: { order: ['path', 'cookie', 'navigator', 'localStorage', 'subdomain', 'queryString', 'htmlTag'], lookupLocalStorage: 'i18nextLng',