When we have multiple languages in UWP (Xliff and Resx). at runtime windows decides which language to load or manually also we can change using Windows.Globalization.ApplicationLanguages.PrimaryLanguageOverride.
I wish to know where are the resources loaded, in which class/object ? I wish to know if after resx are loaded can i change the contents of a specific resource id in memory/object itself. So that on screen it displays the modified content of specific resource id.
I am asking because resx files are also compiled and after which there is no way to change/update resx file at runtime. So i am looking for alternative ways.
Regards
Update:
I've to say that UWP doesn't have APIs that could change the values inside the resources files. You need to modify these values manually and package your app with a new version. Then you could update your app on other devices. I'd suggest you pre-define more strings in your resources files for different scenarios. So you could switch to different values using ResourceLoader Class if you really need to do that.
Old reply: If you just want to use another value to replace the old value that you've already assigned to a control, for example, there is a
TextBlockobject which already uses theHellostring (Hello is the name in the resource file, not the value) from the resource file as text. And now you want to use another resource stringFareWellto replace theHellostring. If this is what you want, you could use the ResourceLoader Class to achieve this.What you need to do in the code-behind looks like: