Initial commit
This commit is contained in:
22
src/lib/translations.ts
Normal file
22
src/lib/translations.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import i18n from 'sveltekit-i18n';
|
||||
|
||||
const config = ({
|
||||
loaders: [
|
||||
{
|
||||
locale: 'en',
|
||||
key: '',
|
||||
loader: async () => (
|
||||
await import('./en.json')
|
||||
).default,
|
||||
},
|
||||
{
|
||||
locale: 'ru',
|
||||
key: '',
|
||||
loader: async () => (
|
||||
await import('./ru.json')
|
||||
).default,
|
||||
}
|
||||
],
|
||||
});
|
||||
|
||||
export const { t, locale, locales, loading, loadTranslations } = new i18n(config);
|
||||
Reference in New Issue
Block a user