1

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.

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

2 Comments

Riiiight... I oversaw that. Thank you so much. I'll look into this :)
Thanks, my standard i18n is ok now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.