My Android app connects to a asp.net web service to register the user. When the user is registered I send a welcome email from the server to the user. As we have customers in many countries the email need to be translated into the right language. I use the following code (C#) on the server to get the body of the email:
string mailbody = (string)HttpContext.GetGlobalResourceObject("Resource", "mailbody");
In my App_GlobalResources-folder I have a file containing the English translation called Resource.resx and for the Swedish translation Resource.sv.resx.
Many English users are now complaining about that they get the Swedish translation sent instead of the English translation. Every time I test this on my Android phones I get the right translation so it is hard for me to track this error down. Also this has been working great when connected from iPhone. Any ideas what can be wrong? Have anyone seen a problem like this?
The behavior you describes seem pretty odd. It seems to be related to Culture detection in your web service and of course web.config might play a role here.
However, setting culture and uiCulture to “auto” should detect the most desired culture from web browser, that is I don’t think it should be Swedish for English user… I would suspect some strange fall-back rule.
Are you really sure your neutral-culture resources (Resource.resx) are in English (just to double check that)?
Maybe you have some overrides in Global.asax?
If the answer for both question is “it’s OK”, maybe try to modify settings to uiCulture=”auto:en-US” so that language falls back directly to English (United States). With no other resources and neutral culture resources in English, it should, but…