SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two Label Controls with text property as "Name" and "Company". I want to change the text of these two Controls into Swedish language. For this, I created resource (.resx) file named "MyResource" under mapped folder. How i use this resource file in SPUtility.GetLocalizedString() method ? Can anybody explain about all the parameters used in this method ? Need one example e.g, with "Name" label Control ?

share|improve this question
The MSDN entry on the subject explains it quite completely. – TZHX Dec 10 '12 at 15:42

You mean like this?

using (SPSite site = new SPSite("http://localhost"))
            using (SPWeb web = site.RootWeb)
                if (web.IsMultilingual)
                    IEnumerable<CultureInfo> cultures = web.SupportedUICultures;
                    foreach (CultureInfo culture in cultures)
                        // Print the value of a language resource in the current language.
                        string str = "$Resources:onet_TeamWebSite";
                        string locStr = SPUtility.GetLocalizedString(str, 

                        Console.WriteLine("{0}  {1}", culture.Name, locStr);

Reference: SPUtility.GetLocalizedString method

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.