I need to get a SharePoint list title in a specified language and i am trying to use the SPUtility.GetLocalizedString Method:

public static string GetLocalizedString(
    string source,
    string defaultResourceFile,
    uint language

The problem is that i don't know what to place in the source parameter, and the default resource file where SharePoint stores list names.

Thank you for your help.


Thank tou guys for your answers, the solution was simpler than i thought.

To get an SPList title in a specified language (culture) we can use the TitleResource property.


Have you looked at Localizing SharePoint Solutions and How to: Add a Resource File ?


According to the documentation on MSDN, you should use the following:

source: An ASP.NET resource expression in the form $Resources:keyname, where keyname is the name half of a name/value pair in a resource file (.resx).

defaultResourceFile: The base file name of the language resource file containing a localized string value. For example, if you have a series of resource files named myresources.en-us.resx, myresources.es-es.resx, myresources.de-de.resx, and so on, the value to pass in this parameter is myresources.

In your case, I would think you should use:

GetLocalizedString("$Resources:custList", "core", 1033) //1033 for English

I got the values from looking at the CustomList definition at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES\CustomList\ListTemplates\CustomList.xml on my SharePoint installation.

  • 'custList' always returns 'Custom List'. If i want to iterate thru all SPlists with what i need to replace it? – user3470 Feb 27 '12 at 9:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy