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 want to create something like a text localization system. Say I have a Dictionary<string, Dictionary<string, string>> mapping from language codes to translation tables containing key-value pairs, and a global setting of the currently active language. There'll be custom controls like a LocalizedLabel that exposes a Key property to update its Text accordingly.
Is there a clean way to specify bindings to a global resource (like an application-scope StaticResource), or do I have to inject the same thing into all such viewmodels, or even resort to a singleton?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I want to create something like a text localization system. Say I have a
Dictionary<string, Dictionary<string, string>>
mapping from language codes to translation tables containing key-value pairs, and a global setting of the currently active language. There'll be custom controls like aLocalizedLabel
that exposes aKey
property to update itsText
accordingly.Is there a clean way to specify bindings to a global resource (like an application-scope
StaticResource
), or do I have to inject the same thing into all such viewmodels, or even resort to a singleton?Beta Was this translation helpful? Give feedback.
All reactions