Alex Rivera | Logout

ASP.NET MVC language change link

Asked 2011-06-27T14:57:08.903
10

I have an ASP.NET MVC site that it's in two languages using Resources. To allow the server to present the site in the apropiate language (depending on the one that's configured in the user's browser) I put the following in my web.config:

<globalization culture="es-es" uiCulture="auto" />

How can I add a link to change the uiCulture? I want to store the selection in a cookie and if it's not present, then fall back to the browser configuration... Is it possible?

Edit
Report

1 Answer

1

If you use the App_GloabalResources to store your resx language files, all you have to do is add a drop down which changes the current thread's UI Culture and this will automatically select the right resx language file to display.

answered 2011-06-27T15:02:35.370

Your Answer