user2921851
user2921851

Reputation: 990

Loading an external String Resource to UWP app

I suspect this may not be possible, just in case some one has done it.

I needed some flexibility in testing localization when I get translated string resource which is easy to manipulate as XML document (native format for UWP string resource files *.resw).

Is it possible to convert externally loaded XML into resw resource and manipulate as a string resource (which normally is compiled and part of the assembly) during runtime? If possible, some examples or pointers/refernces please.

I needed this in a test scenario (to test different translated languages) rather than in production mode.

Upvotes: 0

Views: 493

Answers (1)

Sunteen Wu
Sunteen Wu

Reputation: 10627

Is it possible to convert externally loaded XML into resw resource and manipulate as a string resource (which normally is compiled and part of the assembly) during runtime?

The string resource files are in XML or ResJSON text format, so could be handed off for translation using any text editor. You may update the resource file in XML format during compile time.

But you cannot update the .resw file during runtime so that you cannot convert externally XML into .resw resource during runtime. The resource file should be located in install folder which is read only.

More details for how to use application resources to separate localizable content from app code please reference the official sample.

Upvotes: 1

Related Questions