I have a solution with 3 projects:
- Portable class library containing functions and LocalizedStrings.resx files for localization
- WPF application for Windows 7
- Universal app for Windows 10
In my WPF app I use the following code to access the strings from the resx files:
private ResourceManager localizedStrings;
public MainWindow()
{
localizedStrings = new ResourceManager(typeof(LocalizedStrings));
InitializeComponent();
tbTest.Text = localizedStrings.GetString("headerToolData");
Now I want to use the same code in my UWP app but it doesn't work. I always get the value for the language set as "Default language" in the package manifest.
How can I correctly access strings defined in an resx file included in a pcl in UWP apps?