We have a couple of thousand localized strings in our application. I want to create a unit test to iterate all the keys and all the languages you support so that each language has every key present in the standard (English) resx file.
My idea is to use Reflection to get all the keys from the Strings class, and then use the ResourceManager to compare the resulting value for each key in each language and compare it to make sure it doesn't match the English version, but of course some words are the same in different languages.
Is there a way to check if the ResourceManager got its value from the satellite assembly compared to the default resource file?
Call example:
string en = resourceManager.GetString("MyString", new CultureInfo("en")); string es = resourceManager.GetString("MyString", new CultureInfo("es"));
source share