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.
Currently, it seems that loading dictionaries registers it to a single global store. While this is fine for most use cases, this doesn't (easily) allow mixing and matching of languages in the same UI. For example, someone might want the UI in one language but have place names in another. An example of what I mean:
Somewhat similar to Google maps, where if you view a foreign country it shows the localised version of the name in addition to the native name.
Describe the solution you'd like
Able to have register different i18n instances with their own dictionary files.
Then, maybe have each instance as a child of _, (eg _.ui("nav.home"), _.places("locations.berlin"))
Or alternatively, in the init of the library, be able to assign each i18n instance to their own store
Describe alternatives you've considered
Loading the secondary language manually, just not localising things separately and forcing a global choice of localisation
How important is this feature to you?
Somewhat important. The use-case I had in mind for this is showing info related to a game in an overlay most likely to be used by streamers. They might want the app UI to be in their native languages, but have placenames from the game and/or other viewer-facing parts of the stream in English
Additional context
I'm writing a desktop app with Tauri that uses Sveltekit for the UI.
From a preliminary glance, it seems that #179might allow this to happen?
The text was updated successfully, but these errors were encountered:
EmeraldSnorlax
changed the title
Be able to mix and match dictionaries
Be able to different dictionary instances
Jun 22, 2022
EmeraldSnorlax
changed the title
Be able to different dictionary instances
Be able to have different dictionary instances
Jun 22, 2022
Is your feature request related to a problem? Please describe.
Currently, it seems that loading dictionaries registers it to a single global store. While this is fine for most use cases, this doesn't (easily) allow mixing and matching of languages in the same UI. For example, someone might want the UI in one language but have place names in another. An example of what I mean:
Somewhat similar to Google maps, where if you view a foreign country it shows the localised version of the name in addition to the native name.
Describe the solution you'd like
Able to have register different i18n instances with their own dictionary files.
Then, maybe have each instance as a child of
_
, (eg_.ui("nav.home")
,_.places("locations.berlin")
)Or alternatively, in the init of the library, be able to assign each i18n instance to their own store
Describe alternatives you've considered
Loading the secondary language manually, just not localising things separately and forcing a global choice of localisation
How important is this feature to you?
Somewhat important. The use-case I had in mind for this is showing info related to a game in an overlay most likely to be used by streamers. They might want the app UI to be in their native languages, but have placenames from the game and/or other viewer-facing parts of the stream in English
Additional context
I'm writing a desktop app with Tauri that uses Sveltekit for the UI.
From a preliminary glance, it seems that #179 might allow this to happen?
The text was updated successfully, but these errors were encountered: