Localize (hidden) list templates.

Introduction

When in a (localized) variations site, certain “list templates” do not show when trying to create a new list. The “list template” is only available in the master variation with the locale set to English.

Including list templates in your SharePoint (Visual Studio) projects can be straight forward. On a list do a “save as template”, download the ‘stp’ file and add it to your project. However they need to be localized to show in a localized (variations) site.

For information about localization see here : http://msdn.microsoft.com/en-us/goglobal/bb688174

The Solution

To localize the stp files :

  • Download the list template to your local computer.
  • Change the extension of the file from ‘stp’ to ‘cab’.
  • Open the cab file with your compression tool of choice (I use WinRar)
  • Extract the manifest.xml to your hard drive.
  • Open the manifest.xml with Notepad
  • You will notice that there is a <language> tag is defined.
    In my sample this is:
    &lt;Language&gt;1033&lt;/Language&gt;
  • Simply change the number between the language tags to the desired ‘locale’.
    Examples:
    Dutch is number 1043
    French is number 1036.

    For a full list of the defined locale numbers look here:
    http://msdn.microsoft.com/en-us/goglobal/bb964664

  • Save the manifest.xml
  • Create new stp file

  • Now we will recreate the cab file with CABARC. See details below.
  • Open the command prompt and type the following command:
    CABARC.EXE N “CarouselTemplateNL.cab” C:TempProject1CarouselTemplateNL*.*

  • This will result in a new cab file called: “CarouselTemplateNL.cab”
  • Rename the file back to .stp
  • Upload the file into your list templates gallery
    Site Actions -> Site settings -> Galleries -> List templates -> Upload document

CABARC

“CABARC” is a program from Microsoft to create cab files. Lately it has been replaced by a new program called “makecab”.

CABARC did the job for me but you probably can achieve the same result with makecab

You can download CABARC by downloading the Windows XP Service Pack 2 Support Tools
http://www.microsoft.com/download/en/details.aspx?id=18546
There is no need to install this package. Just unzip the file (and it’s cab files) to your locale machine. One of the unzipped files is CABARC.

Tip for when you don’t know what locales are installed on your SharePoint server.
The quickest way is go to the SharePoint installation folder (aka ’14 hive’) and look in the /TEMPLATE/LAYOUTS folder.

3 Comments

  1. sound studio

    May 11, 2012

    whoah this weblog is fantastic i love studying your
    posts. Stay up the good work! You recognize, many persons
    are looking round for this info, you can aid them greatly.

  2. forever greatful!

    March 13, 2013

    Your instructions were perfect! I created a list template to copy a list and its content from an en-us source site to three variations target sites (including french and spanish). Was shocked to not be able to see the template when trying to add the list and its content to those sites. Thank you SO MUCH!

Share Your Thoughts