문제

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