I have a single resource file (.resx) that defines the following languages:
neutral
- International English as the default/fallback languageen-US
- Sparsely populated for words like colour/colorde
- German translations
To get a resource string I am using the 'System.Resources.ResourceManager(Type resourceSource)` as follows:
var culture = new CultureInfo("en");
var resourceManager = new ResourceManager(resourceType);
var translatedString = rm.GetString("FavouriteColour", culture)
When I call the above with the culture set to en-GB
I get the default/neutral resource value of "Favourite Colour" as expected, but if I specify the culture as simply en
I get the en-US
resource value of "Favourite Color"
Why does the ResourceManager resolve the neutral en
language to the en-US
variant and is there any way to stop this behaviour?