Reputation: 1025
I followed the MSDN Internationalization tutorial so that my website can work with multiple languages. My current routing is like {language}/{controller}/{action}/{id}
and takes the language of the browser.
Now I got a problem:
If i change my url from website.com/EN/..
to website.com/NL
, it does not take this one and keeps using the browser language. How to overwrite this?
I tried following the other tutorials on
http://msdn.microsoft.com/en-us/library/gg416514%28v=vs.108%29.aspx
about internationalization but first, English isn't my first language + I'm coding in VB, while all tutorials are in C#.
If you could just push me in the right way, I can work it out on my own.
Upvotes: 1
Views: 1204
Reputation: 15410
Without more details about your implementation of the language switching based on the URL it's hard to tell, but if the app always uses the browser's language it must be that your web.config file contains something like <globalization uiCulture="auto" culture="auto" />
, which causes ASP.NET to automatically set the CurrentUICulture and the CurrentCulture to one matching the accept-language header. Perhaps this interferes with your logic, so you could try removing this setting or replacing auto with a suitable culture name (such as en-US).
MSDN has more information here: http://msdn.microsoft.com/en-us/library/bz9tc508%28v=vs.100%29.aspx
Upvotes: 1