I am currently working on a Website which should display ist Messages in the language of the user (I think this is called Internationalization or Globalization). I added the .resx files for English (ist the Default) and another one for German (.de.resx). When I run the Website locally, it nicely Displays german text. Now as soon as I publish the Website to Azure it still works, but everything is in English, although I'm using the same browser with the same language Settings (changing the browser also doesn't change anything). Fiddler tells me the preferred language (Accepted-Language) is actually de, en-US, en (in that order).

Any ideas why Azure will render everything in English all the time? the Website is an MVC5 Website developed in Visual Studio 2013.

有帮助吗?

解决方案

Alright, actually it was easier than I expected. All that was required is to add the following line to your (published) web.config file:

  <system.web>
    ....
    <globalization enableClientBasedCulture="true" uiCulture="auto" culture="auto" />
  </system.web>
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top