feat: add bg and pl to language switcher
This should help translators see their efforts come to fruition. Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
This commit is contained in:
parent
519c6a045a
commit
3e4e725347
5 changed files with 459 additions and 457 deletions
|
@ -15,16 +15,18 @@ import { init, register } from 'svelte-i18n';
|
||||||
|
|
||||||
const defaultLocale = 'en';
|
const defaultLocale = 'en';
|
||||||
|
|
||||||
|
register('bg', () => import('./locales/bg.json'));
|
||||||
register('de', () => import('./locales/de.json'));
|
register('de', () => import('./locales/de.json'));
|
||||||
register('en', () => import('./locales/en.json'));
|
register('en', () => import('./locales/en.json'));
|
||||||
register('he', () => import('./locales/he.json'));
|
register('he', () => import('./locales/he.json'));
|
||||||
|
register('pl', () => import('./locales/pl.json'));
|
||||||
|
|
||||||
init({
|
init({
|
||||||
fallbackLocale: defaultLocale,
|
fallbackLocale: defaultLocale,
|
||||||
initialLocale: browser ? window.navigator.language : defaultLocale
|
initialLocale: browser ? window.navigator.language : defaultLocale
|
||||||
});
|
});
|
||||||
|
|
||||||
export function mapLocaleToDir(locale: 'de' | 'en' | 'he'): 'ltr' | 'rtl' {
|
export function mapLocaleToDir(locale: 'bg' | 'de' | 'en' | 'he' | 'pl'): 'ltr' | 'rtl' {
|
||||||
if (['he'].includes(locale)) {
|
if (['he'].includes(locale)) {
|
||||||
return 'rtl';
|
return 'rtl';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue