Resource File Examples
- Stuff.resx (contains English, is the default resource file)
- Stuff.de.resx (contains German)
- Stuff.fr.resx (contains French)
Now in web.config use
<globalization enableClientBasedCulture="true" uiCulture="auto:en" culture="auto:en" />
This ("auto") will allow the browser settings to be solved (German browsers get German resources, etc.)
However (in the example above), if a Swedish browser is used, the default will be ru , since there is no se (Swedish) resource file and backup English ("auto: ru "). uiCulture will be used.
So ... then:
[assembly: NeutralResourcesLanguageAttribute("en")]
Allows the app to now query English queries directly to default.resx without another ru resx search.
In addition, if the English browser asks for it, it should go directly to the default resource file without trying to do something first. Thus, the NeutralResourcesLanguageAttribute parameter is also present here. The app knows to go directly to resx by default.
source share