The site columns that are deployed by SharePoint are localized out of the box. In a Dutch SharePoint site, the displayname of field “Date Picture Taken” is “Afbeelding gemaakt op”. In this post I will show you how to do this for your own . The XML definition for the displayname of this field (from the fields feature looks like this:
DisplayName="$Resources:core,Date_Picture_Taken;"
This string is a reference to the resource files. These files can be found in folder 12HIVE\Resources. The part of the string in the example after “$Resources” references the resource file. In this case, this is “core”. If we take a look in the resources folder, we see there are 3 resource files:
- core.resx
- core.en-US.resx
- core.nl-nl.resx
In our Dutch site, the resource strings are loaded from “core.nl-nl.resx”. In the name of this file, “nl-nl” is the language locale. Please note however that SharePoint does not load all resources from this location at runtime. Resources used in ASPX pages are loaded from the App_GlobalResources folder under your inetpub folder (see this item by Shane Perran and this item by Mikhail Dikov). In most cases this folder is “C:\Inetpub\wwwroot\wss\VirtualDirectories\80\App_GlobalResources”. In case of the site columns created in a feature, the resources are loaded from the Resources folder in the 12HIVE.
We can use exact the same mechanism for our own site columns (this is not limited to site columns, but I am using this as an example). Here are the steps:
- Create a resource file called “tst.resx”
- Add these 2 items:
<data name="MyColumns" xml:space="preserve">
<value>My custom fields</value>
</data>
<data name="TST_RegionField" xml:space="preserve">
<value>Region field description</value>
</data>
- Create a resource file called “tst.nl-nl.resx”
- Add these 2 items:
<data name="MyColumns" xml:space="preserve">
<value>Mijn gedefinieerde kolommen</value>
</data>
<data name="TST_RegionField" xml:space="preserve">
<value>Beschrijving regio veld</value>
</data>
- Copy the 2 resx files to the Resources folder in the 12 folder:
“C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\Resources”
- Create a new feature that add a new site column in the ElementManifest file:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Field
ID="{373AC34A-AD29-48CF-8E20-D352CACC602D}" Type="Note"
Name="emfRegionField"
StaticName="emfRegionField"
Group="$Resources:tst,MyColumns;"
DisplayName="$Resources:tst,TST_RegionField;"
Required="FALSE"
NumLines="25"
RichText="FALSE"
Sortable="FALSE"
RowOrdinal="0"/>
</Elements>
- According to the naming we have used in the first steps, our resource strings now have to be defined like this:
- $Resources: – identify as resource string
- tst, – the filename prefix of the resx file
- TST_RegionField; – identifier for the string
- Please note that only the displayname and the groupname are localized. The staticname and internal name are equal for all languages.
- Deploy and activate the feature
- IISRESET
- In an English site my site columns now look like this:

- And the same screenshot from a Dutch site:

Creation and deployment of site columns through features is not covered in this post. There are several good articles out there that can help you with this. One of them is my own, to get you started.