UNPKG

svelte-lang

Version:

svelte-lang is an i18n library for Svelte that simplifies multilingual support. It offers a straightforward API for managing translations, supports parameterized strings, and integrates with Svelte stores for reactive language handling. Features include a

9 lines (8 loc) 317 B
import { setupI18n } from '../../i18n/index.js'; import { de } from './translations/de.js'; import { en } from './translations/en.js'; export const translations = { de, en }; export const { t, language, supportedLanguages, tUnsafe, initLanguage } = setupI18n(translations, 'de', { languagePersisted: true });