How to get current language or changes in Sharepoint (MOSS) 2007?

I would like to be able to query the current options from within the web part or management template to determine which language to use. If there are no options, I will select the language from the request.

Is it possible?

thanks

Floor

+4
source share
1 answer

Yep - You can find information in the Variations class .

// found here: http://weblogs.asp.net/davidmccollough/archive/2009/05/12/multilingual-sharepoint-publishing-sites.aspx string currentUrl = SPContext.Current.Web.Url; ReadOnlyCollection<VariationLabel> variationLabels = Variations.Current.UserAccessibleLabels; foreach (VariationLabel vl in variationLabels) { if (currentUrl.StartsWith(vl.TopWebUrl, StringComparison.CurrentCultureIgnoreCase)) { variationUrl = "/" + vl.Title; break; } } 
+3
source

All Articles