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
I would like to use svelte-i18n to provide localized strings to a custom component, if I use string parameters and provide the value through a call to $t('...') the parameter is correctly translated but doesn't change if the language selection is modified.
I managed to have it working by passing the translation key to the component and call $t(...) directly from my component, though I don't find this really clean as it means by component has a dependency and MUST be used with translation.
Could it be possible to introduce a function which would return a Readable instead of a string ? In essence, I'd expect something like this would work:
I can add this in my own code of course, but I think it would be a nice addition to the library (plus I'm not sure if it would work as nicely with parameters).
The text was updated successfully, but these errors were encountered:
I would like to use svelte-i18n to provide localized strings to a custom component, if I use string parameters and provide the value through a call to
$t('...')
the parameter is correctly translated but doesn't change if the language selection is modified.I managed to have it working by passing the translation key to the component and call
$t(...)
directly from my component, though I don't find this really clean as it means by component has a dependency and MUST be used with translation.Could it be possible to introduce a function which would return a Readable instead of a string ? In essence, I'd expect something like this would work:
I can add this in my own code of course, but I think it would be a nice addition to the library (plus I'm not sure if it would work as nicely with parameters).
The text was updated successfully, but these errors were encountered: