In my ASP.Net MVC 3 application I have implement localization. I save localization of user in cookies. In my application I have autentification. What is the best way saving localization in cookies or in session (session is 2880 seconds as in web.config
and after this tyme user should again chouse it's language in application)

- 104,537
- 17
- 209
- 285

- 2,632
- 10
- 45
- 84
-
[This](http://stackoverflow.com/a/5122611/558018) answer might help on adding cookies to the client's cookie store. – AgentFire Aug 30 '12 at 08:40
2 Answers
ASP.NET Session and cookies depends on browser so when user changes the browser he will have to select language again. You may create a setting in database and allow user to select language in profile. In this case you he will not need to reselect language each time he changes a browser.
At the same time you may use cookies to store language locally so when user is not logged in language from cookies will be applied.

- 5,075
- 1
- 25
- 29
LocalStorage is a great place to store application settings that you'd like to persist between sessions (as opposed to sessionStorage) and not be transmitted to the server (as opposed to a cookie). Previously, to avoid having cookie based settings transmitted to the server needlessly, you'd have to use a different subdomain just for cookies.

- 2,263
- 16
- 12
-
Local storage is with html5 here a example http://www.w3schools.com/html5/html5_webstorage.asp – DadViegas Aug 30 '12 at 09:07