ShareThis

Variations in SharePoint 2010


The SharePoint Server 2010 variations feature enables site administrators to make the same information available to specific audiences across different sites by maintaining customizable copies of the content from the source variation in each target variation. Variations feature can be used to manage multilingual sites and pages, when you provision a new SharePoint publishing site.

A variation consists of a set of labels that is used to create a set of sites in a site collection. For example, if you want four language variations of your site, you must create four labels, one for each language. Then the labels are instantiated as SharePoint publishing sites and the full set of labels in a site collection is referred to as the Variations Hierarchy.


Steps to Create Variations

1.    From the Site Collection Administration in the Site Settings, select Variations to set variations settings.



















2.    Specify variation home. To indicate the root site of the site collection, type a slash.








 3.    From the Site Collection Administration in the Site Settings, select Variation labels. Use New Label option to create two labels, one for English and one for French. Let’s use English site as the source site. The source site should be the one where most of the new content enters the system. When creating the source site it is possible to use our custom publishing template as the source template. More information on how to bring our custom publishing template into variations drop-down list can be found here.



























Note: in order to select French (or any language other than English) as a site template language, you should install the correct language pack on the server. Language Packs for SharePoint Server 2010 can be found here. When installing language pack give special attention to install instructions, you are required to run SharePoint configuration wizard and re-run the SharePoint Products and Technologies Configuration Wizard with default settings. Otherwise the language pack will not be installed properly.


4.    Once done with creating labels, select Create Hierarchies option. It will invoke the timer job “Variations Create Hierarchies Job Definition” and timer job will be run based on its schedule.












 5.    You can check the timer job in Central Admin and if required, can change the schedule temporarily to shorter time period (5 minutes) to test the variation creation. Go to Monitoring -> Review job definitions and find “Variations Create Hierarchies Job Definition” timer job of your web application.

If the hierarchies created successfully, you can see it in the variation labels listing. Also typing the site URL in browser will take you to the correct variation site \en or \fr.













Custom Publishing Site Templates

If you are using a custom publishing site template and variation site hierarchy is not getting created for sites other than English, following steps might help.

Make sure you have created webtemp files for each of the language that you create variation labels. Webtemp files reside in the TEMPLATE folder of the 14 hive, inside sub-folders created as LocaleID\XML

So the site difinition structure will look like this.












SharePointProjectItem.spdata file of the site definition will look like this.

<?xml version="1.0" encoding="utf-8"?>
<ProjectItem Type="Microsoft.VisualStudio.SharePoint.SiteDefinition" SupportedTrustLevels="FullTrust" SupportedDeploymentScopes="Package" xmlns="http://schemas.microsoft.com/VisualStudio/2010/SharePointTools/SharePointProjectItemModel">
 <Files>
  <ProjectItemFile Source="1033\webtemp_DEPortal.xml" Target="1033\xml\" Type="TemplateFile" />
  <ProjectItemFile Source="1034\webtemp_DEPortal.xml" Target="1034\xml\" Type="TemplateFile" />
  <ProjectItemFile Source="1036\webtemp_DEPortal.xml" Target="1036\xml\" Type="TemplateFile" />
  <ProjectItemFile Source="DEPortalWebManifest.xml" Target="SiteTemplates\WebManifest\" Type="TemplateFile" />
 </Files>
</ProjectItem>

0 comments: