I am using embedded .resx to localize an asp.net application. It seems that no matter what the current culture is, the neutral culture resource is always returned. The code I am using to retrieve the value is as follows:
protected string GetResource(string name)
{
return Localization.ResCore.ResourceManager.GetString(name, System.Threading.Thread.CurrentThread.CurrentCulture);
}
I've specified in one page that the culture is "es-PE" (Peru). When I break in the GetResource function, I can verify that CurrentCulture is "es-PE" and that the ResourceManager contains a ResourceSet corresponding this culture. However, the string returned is always from the neutral culture set.
The files I am embedding are named as follows:
- ResCore.resx
- ResCore.es.resx
- ResCore.es-PE.resx
Any help is appreciated.