Resourse file (.resw) in UWP

1k Views Asked by At

I have Universal Class Library (.dll) to share between projects. In the dll I have several resources .resw  files dll\rootFolder\Lang\ en.resw , fr.resw , jp.resw.

In my app I have button "Change Language" clicking on which I want change app language like many web sites but the problem is that I can't get this files when clicking on the button using Resources.ResourceLoader()

1

There are 1 best solutions below

0
AlexDrenea On

I believe you haven't placed your resources in the right folders. You should create a structure like this: strings\en\resources.resw, string\fr\resources.resw etc...

Then you use the ResourceLoader to get access to your files and resources

ResourceLoader.GetForCurrentView("[assemblyname]/[resourceName]")

You can check the official sample for application resources as it demonstrates everything that you seem to require in your code.