Return a list of all locales that must be tried before returning the missing translation message. By default, this will consider the inline option, current locale and fallback locale.
i18n.locales.get("de-DE");
// ["de-DE", "de", "en"]
The locale query.
The list of locales.
You can define custom rules for any locale. Just make sure you return an array containing all locales.
// Default the Wookie locale to English.
i18n.locales.register("wk", (_i18n, locale) => {
return ["en"];
});
The locale's name.
The locale resolver strategy.
The registry of locale resolvers. Each I18n instance exposes one as
i18n.locales; it maps a locale to the ordered list of locales translations are looked up in (the fallback chain).