2

In my WPF application I have three .resx files: Resources.en-US.resx, Resources.resx, and Resources.nl-BE.resx. Each resource file is built as an embedded resource. In each wpf view, I`ve bound the each control to the proper static resource string.

The static ResourceManager constructor in the Resources.Designer.cs file instantiates a ResourceManager with the correct namespace and basename.

During initialization, I run the following line of code:

Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture;

If my Region and Language format is en-US, or nl-BE, the elements in the UI show the correct localized string. If I set my Region and Language format to something else like English – Zimbabwe I get an XamlParseException. I suspect that it's trying to find the en-ZW resource. How do make sure if the resource for that culture is not found, it defaults to my Resources.resx?

Brian T
  • 885
  • 2
  • 9
  • 18

0 Answers0