Last post Mar 28, 2014 05:28 AM by rstrahl
Jan 22, 2014 02:27 AM|Rocker|LINK
In my application, after suffeccessfully login, apicontroller returns user detail which have language. According to that language i need to set culture for that user.
I havent implemented localization yet , i am new to this .So please help me and give me details in brief. Here are some question :
1. How should i implement localization by setting once after login?
2. Is it possible to implement session in WebApi ? If yes, is it then correct way to implement as webApi is RESTful service which do not have state ??
3. let me know correct way to implement localization in MVC4 with resx file (Controller + View + Api Controller)
Mar 26, 2014 05:22 PM|damienBod|LINK
Here's a link about Web API Localization:
You need the set the culture on the current thread:
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
Mar 28, 2014 05:28 AM|rstrahl|LINK
The following might help with an easy way to set the Locale in your application based on user settings, or automatically:
+++ Rick ---