Nick Grattan's Blog

About Microsoft SharePoint, .NET, Natural Language Processing and Machine Learning

SharePoint Global Resource (resx) file locations

with 2 comments

Global resource (resx) files are stored in the following locations in SharePoint 2010:

  • App_GlobalResources folder in the VirtualDirectories folder in inetpub (e.g. C:\inetpub\wwwroot\wss\VirtualDirectories\80)
  • Resources folder in the 14 hive (e.g. C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Resources)
  • Config/Resources folder in the 14 hive (e.g. C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\Resources)

In general, a single resx file in your solution should be copied into each of these locations during installation.  This is how they are used:

  • Resources files in App_GlobalResources are used when code in an ASPX page refers to a resource, e.g.

<asp:Label ID="lblNumberingTitle" runat="server" Text="<%$Resources:GlobalSiteResources, AutoNameTitle %>" />

  • Resources files in the Resources folder are used when referencing resources using the SharePoint object model, e.g.

btnExport.Text = SPUtility.GetLocalizedString("$Resources:GlobalSiteResources, Tab_Export", "GloablSiteResources", language);

  • Resources files in the Config/Resources are copied into the App_GlobalResources folder whenever a new web application is created. By adding the resx files here you will ensure your application will be able to access its global resource files in new web applications.
Advertisements

Written by Nick Grattan

May 24, 2011 at 12:53 pm

2 Responses

Subscribe to comments with RSS.

  1. […] Nick Grattan has a great post about the location of the SharePoint 2010 Global Resource File Locations.  […]

  2. I have create same solution. Once I deployed the solution I have updated App Global Resource file. Changes are reflected in the file hosted at IIS however changes will not be visible over the SharePoint site. I have restart iis, recycle application pool and delete all the cache file from the C:\Windows\Framework folder still I unable to see the changes in SharePoint site. Can you please help?

    Jay

    August 31, 2015 at 6:31 am


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: