Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n: Enabled German translation #451

Merged
merged 10 commits into from
Mar 3, 2024
9 changes: 6 additions & 3 deletions src/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
];

Expand All @@ -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',
Expand Down
Loading