Ref: https://www.codeproject.com/Articles/299436/WPF-Localization-for-Dummies"
The above example works fine for a project:resource ratio of 1:1, but ....
When you scale up, and have several application projects in a solution that are all language dependant it's much easier to maintain one language resource file.
To achieve this I have:
1. Created a Class Library Project called 'GlobalLanguage' and added a language resource to it that will be the common language resource to all my appl. projects in the solution
2. The default namespace for this GlobalLanguage project is: Company.Product.GlobalLanguage
3. I then add this project class library as a reference to my appl project.
4. My appl project has an existing local resource (which I intend to remove once I get the global laguage resource working) The namespace of the appl project is Company.Product.Appl
5. my appl xaml page has two namespace references:
xmlns:localLang="clr-namespace:Company.Product.Appl.Properties"
xmlns:GlobalLang="clr-namespace:Company.Product.
GlobalLanguage.Properties"
VS2015 shows an error in the underlined section above, Why?
6. When I refer to the GlobalLanguage language resource in a *.cs source within the appl project it works fine. Eg:
string msg = Company.Product.GlobalLanguage.Properties.Resources.ErrorUserNotAllowed;
The error in the XAML page is
"Undefined CLR namespace. The 'clr-namespace' URI refers to a namespace 'Company.Product.GlobalLanguage' that could not be found." (See ref #3 : problem doesnt go away after compile)
What I have tried:
Have reviewed:
#1
https://social.msdn.microsoft.com/Forums/vstudio/en-US/d4348323-7326-4fc1-afd4-239e8fdb5fc0/wpf-undefined-clr-namespace-the-clrnamespace-uri-refers-to-a-namespace-that-is-not-included?forum=wpf
#2
https://www.codeproject.com/Articles/299436/WPF-Localization-for-Dummies"
#3
https://stackoverflow.com/questions/3425954/the-clr-namespace-uri-refers-to-a-namespace-that-is-not-included-in-the-assemb