Skip to content

Commit

Permalink
chore: linting & formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmedhossamdev committed Oct 23, 2024
1 parent 9276155 commit d8db59c
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/lib/i18n.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
import { init, register, getLocaleFromNavigator } from 'svelte-i18n';


register('en', () => import('./../locales/en.json')); // English
register('es', () => import('./../locales/es.json')); // Spanish
register('pl', () => import('./../locales/pl.json')); // Polish
register('vi', () => import('./../locales/vi.json')); // Vietnamese
register('tl', () => import('./../locales/tl.json')); // Tagalog
register('so', () => import('./../locales/so.json')); // Somali
register('am', () => import('./../locales/am.json')); // Amharic
register('en', () => import('./../locales/en.json')); // English
register('es', () => import('./../locales/es.json')); // Spanish
register('pl', () => import('./../locales/pl.json')); // Polish
register('vi', () => import('./../locales/vi.json')); // Vietnamese
register('tl', () => import('./../locales/tl.json')); // Tagalog
register('so', () => import('./../locales/so.json')); // Somali
register('am', () => import('./../locales/am.json')); // Amharic

const locale = getLocaleFromNavigator();

const lang = locale ? locale.split('-')[0] : 'en';

console.log(lang)

init({
fallbackLocale: 'en',
initialLocale: lang
Expand Down

0 comments on commit d8db59c

Please sign in to comment.