You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
This would give a good overview over the registered locales. And enable one to easily implement a locales switcher referencing the registered locales as the source of thruth, this is also saving time when adding or modifying locals.
Describe the solution you'd like
I would like a register store to be implemented, which has an array of objects representing each locale. The locale objects could have properties like:
The locale objects could replace the locale string in the register func, and the string passed currently becomes part of the object.
Describe alternatives you've considered
Right now I am creating the mentioned array myself and I am looping over it and calling the register function for each of the objects. Maybe you could also implement a register locales function which accepts an array of locales objects and registers each locales.
Is your feature request related to a problem? Please describe.
This would give a good overview over the registered locales. And enable one to easily implement a locales switcher referencing the registered locales as the source of thruth, this is also saving time when adding or modifying locals.
Describe the solution you'd like
I would like a register store to be implemented, which has an array of objects representing each locale. The locale objects could have properties like:
{ languageCode: string; languageName: string; flagUrl: string; etc... }
The locale objects could replace the locale string in the register func, and the string passed currently becomes part of the object.
Describe alternatives you've considered
Right now I am creating the mentioned array myself and I am looping over it and calling the register function for each of the objects. Maybe you could also implement a register locales function which accepts an array of locales objects and registers each locales.
registerStore.set([
{
languageCode: "en",
languageTitle: "English"
},
{
languageCode: "de-DE",
languageTitle: "Deutsch"
},
{
languageCode: "ja-JP",
languageTitle: "日本語"
},
{
languageCode: "fr-FR",
languageTitle: "Français"
}
]);
locales.forEach(locale => {
register(locale.languageCode, () => import(
$lib/i18n/${locale.languageCode}.json
))});
How important is this feature to you?
important yes
Additional context
none
The text was updated successfully, but these errors were encountered: