Optionaloptions:
I18nOptions
Optionalfetcher
Readonlylang$
A Readable of current lang.
Readonlylocale$
A Readable of current locale.
Readonlylocales$
A Writable of all loaded locales.
Readonlyt
Translation function that uses the current t$ function.
Readonlyt$
A Readable of current translate function.
Current lang.
Current locale
All loaded locales.
Add a locale to the locales.
Use i18n.locales$.set() for more control.
— boolean indicating whether a message with the specified key in current language exists or not.
Change language.
— a promise that resolves when the new locale is fetched.
Staticpreload
Fetch locale of initialLang and return an I18n instance with the locale.
Fetch locale of the specified lang.