How to get current user locale so as to display correct data
-
Monday, June 18, 2012 11:59 AM
Hi There,
I am making data-view which gets data from a list(having different language columns).
My problem is I want to get the current user locale in XSLT and then display data from appropriate language column by comparing the LCID's.
Like if the LCID is 1033 display english conlumn in data-view.
This thread suggests using $CurrentLCID parameter, but it does not work.
Kindly suggest a way if anyone knows.
Regards, Nayan
All Replies
-
Monday, June 18, 2012 12:13 PM
You could try SPContext.Current.Web.CurrentUser.RegionalSettings.LocaleID
Here is credit to the link that helped me; http://sharepoint.stackexchange.com/questions/9141/how-do-i-programatically-access-locale-in-my-custom-web-part
- Proposed As Answer by Dmitry KaloshinMicrosoft Community Contributor Monday, June 18, 2012 12:50 PM
- Unproposed As Answer by Nayan N Monday, June 18, 2012 5:06 PM
-
Monday, June 18, 2012 5:06 PM
Hi GoingForward,
Thanks for the link.
But as I said; I need to make data-view webpart using sharepoint designer. I have already made several custom web-parts using CultureInfo class in Visual Studio.
If you want me to use the code in ECMAScript, please if you could explain me in short how to use that, will be very useful. I have never did that before.
Thanks!
Regards, Nayan
-
Monday, June 18, 2012 6:16 PM
Cant help you there Nayan. Sorry.
This was just something I was aware of from one of my Colleague's work.

