26
Sep
2018

SharePoint 2013 Variations

Huge organizations have many people working in the same organization in different regions across the globe having different languages for communication. In general scenario regional language is more in to preference. As internet facilities are now easily available, websites are the most favorable and less expensive equipment for marketing purpose. Websites should be capable enough to provide content suitable to their target audiences across the globe. But maintaining the different sites with different languages is very difficult for content redundancy point of view.

SharePoint 2013 Variations

According to Microsoft, many fortune 500 Companies are using SharePoint for public facing sites and as intranet sites to manage their businesses. They have many offices in different regions of the world. These types of company’s needs websites that deliver customized content, to suit different cultures and different markets. It is very tedious and time-consuming task to maintain and manage data with different languages. They have to make sure that data must be redundant. Therefore, Microsoft SharePoint has provided below approaches to manage multi-lingual sites:

  1. Install different language packs in SharePoint server: We can install different language packs in a SharePoint environment to support more than one language. But this will only affect the site administration pages and user interface but does not affect content created on site.
  2. Use the variations feature to make publishing content available in different languages on different sites: Different sites will be created for different languages and content will be sync between these sites. Unlike the first option, this feature does not affect the administration pages and user interface, only affects the content.

    Today, we will discuss for SharePoint variation features to manage content in multi-lingual sites. Points are insight by the team of SharePoint developers taking into considerations the real-time scenarios faced while the development phases and client requirements.

    We can use SharePoint variation feature to support multi-lingual sites in SharePoint server and SharePoint Online. Using Variation feature in SharePoint development, site administrators can simplify the process of maintaining these sites with different languages. It automates the creation, synchronization, and translation of sites, lists, and pages in SharePoint sites.

    When the user visits the root site, they are redirected to the appropriate variation site according to language settings in their browser settings. Variations can be utilized only on sites that are built by utilizing one of the Publishing site templates, or on sites for which the SharePoint Server Publishing Infrastructure feature was initiated.

Scenarios for using variations

We can manage variations to build and design sites, lists, and page content for specific linguistics. For example, the content might be accessible in English and be synced to target variation sites for translation into other languages say for example Arabic, German, French, and Spanish.

We can also use variations to create content for specific locales. For example, the Arabic language might have target variation sites for the following locales: Arabic (Egypt), Arabic (Qatar), Arabic (Saudi Arabia) etc. While SharePoint consulting, this is the general scenario commonly we came across with the clients.

The largest part of the content is authored in English (United States) in the general scenario, and the variation feature syncs that available content to the target variation sites.

Content on the French (Canada) and Dutch (Mexico) site are translated into French and Dutch, whereas content for English is edited to account for regional differences in Egypt and Qatar Arabic. Other content that is individual to a specific region is built on the target variation sites for which it is required.

In SharePoint 2010, we are using variations to create sites in different mobile devices, or that used different branding. In SharePoint 2016 based application development, variations are used only for multilingual sites. To create sites for different mobile devices in SharePoint 2016, we can use Device Channels. To create sites with different branding, we can use cross-site publishing.

Elements used in Variation features

The variations feature consists of the following elements:

  1. Variation Root Site: The variation root site is the source site of all the variation. Root site provides the URL for all source and target variation site and landing page URL to redirect in a specific variation site. Note: Variation root site is not the same as site collection root site, but we can set the site collection root site as a root site of variation hierarchy.
  2. Variation labels: A variation label is an identifier of a new variation site. We can create a variation site by creating/configuring the Variation label. Note: SharePoint Server supports up to 209 variation labels. SharePoint Online supports up to 50 variation labels.
  3.  Variations hierarchy: This is a hierarchy of all the Variations site with all variation label.
  4. Variation lists: Variation lists are lists where we specifically target variation labels to receive/sync list items.
  5. Variation pages: Variation pages are the publishing pages that are stored in the Pages library of the source variation site and the target variation sites. Important: Recommended that we do not add non-publishing pages to the Pages library of a site that uses variations. If we do that, the Variations Create Hierarchies Job Definition timer job might fail.
  6. Variation sites: Variation sites are the sites that are created based on the variation labels. There are two types of variation sites:
    1. Source variation site:The source variation site is the site where shared content is available and published, and it is the site from where the shared content is synced with target variation sites. There is only one source variation site per one site collection. Once we created a source variation site, it cannot be changed later.
    2. Target variation sites:The target variation sites receive/synced most of their content from the source variation site. We can add/update new content on a target variation site. However, that content is not synced with other sites and is individual to the site on which it was built.

Let’s start by configuring variation feature in SharePoint server:

Here, I have used SharePoint 2013 enterprise server for illustration purpose.

Variation Feature Prerequisites

SharePoint Variation feature requires below prerequisites:.

  1. Install required language packs on SharePoint server.Language pack on Sharepoint Server
  2. Configure Machine Translation service and make sure it is started in SharePoint Central Administration under “Application Management”.

    Manage services on server:

    Manage services on server

    Manage service applications:

    Manage service applications

  3. Require SharePoint site created using “Publishing” site template or site with “SharePoint Server Publishing feature” features activated.Sharepoint server publishing featureSharepoint server publishing

Configure Variations Settings

To Configure/Setup Variation in SharePoint site follow below settings:

  1. Go to Site Settings.
  2. Under “Site Collection Administration”, we can see the below variations settings are available:
    • Variations Settings
    • Variation labels
    • Variation logs
    • Translatable columns

    Site Collection Administration

  3. Go to Variations Settings.Variation Settings
  4. Here we have below self-explanatory settings are available, we can change these settings as per our requirements, else we can put these settings as it is.
    • Create Everywhere (Default): This option will propagate any content created in source label to all target variations.  Sync will happen automatically.
    • Create Selectively: This option will allow us to sync content to some but not for all target site. Variation should be triggered manually.
    • Recreate Deleted Target Page: This option will allow us to choose, whether a new target page should be recreated when the source page is republished, if the previous target page has been deleted.
    • Update Target Page Web Parts: This option will allow us to choose, whether Web Part changes from source page should be updated to existing target pages or not.  Note: Web Parts personalization will be lost when the update is made.
    • Notification: This option allows us to send an e-mail to the contact person of the welcome page of the target site when a new sub site or page is built, or the contact person of a page when a target page is refreshed with updates and alternatives from the source variation.

Create Variation Source Label

To create source variations site/label from where the content should be variant to the target site, follow the below steps:

  1. Go to Site Settings >Variation labelsNote: The very first variation label which we are creating will be the “Source Variation” site.
  2. Click on New Label.Variation Labels
  3. Let’s create English as a source site.
    • Language: This setting defines SharePoint User interface elements of the variation site. Options look on the site template language drop-down depends on the language sets installed.
    • Locale: Locale determines the language site based on our browser settings. Automatically it redirects the browser from Variation home to target variation site. Locale helps in creating content in different languages.
    • Variation Home: Location where the source and target variations will be created.
    • Label Name and Description: This name will be used to create the variation site and will appear in the URL. The name cannot be changed once the label is created.
    • Display Name: User-friendly, locale-appropriate name for the variation label.
    • Publishing Site Template: Select the site template that will be used to create top-level source and target variation sites.
    • Label Contact: If email notifications are enabled in variation settings, label contacts will receive emails when this source variation site is created.

    Create variation Label

  4. Click on “OK” to create source variation.
  5. Create Source variation

Create Variation Target Label(s)

To create target variations site/label, follow the below steps:

  1. Go to Site Settings > Variation labels > New Label.
  2. Let’s create Arabic as a first target variation site.
  3. Select Language and Locale, I have selected Arabic and Arabic (Qatar) respectively. Click on Continue.Configure target Label
  4. Enter appropriate variation Label Name, Description and Display Name. Select the portion of the source hierarchy we would like copied, this will be built label’s structure based on the source hierarchy during Hierarchy Creation. Click on Continue.Name your Target label
  5. Select appropriate Translation options.
    • Create Translation Package: Enabling human translation on this target will allow users to export content to an XLIFF file. Users may then transfer the file to a translator for professional translation.
    • Machine Translation: Enabling machine translation on this target will allow users to send content online to Microsoft for translation. We may use content users send us to improve the quality of translations.

    Translation options

  6. Click on Continue.
  7. Select appropriate Page Update Behavior from below and label Contact as per the requirements and click on Continue.
    • Users can manually sync updates from source variation pages: If the user doesn’t want to sync content from the source variation to target variation in that this option will be useful. For Example, In Source label pushed the content first time and target label authors translated the content to the target site, then later if user change in the source site but user don’t want to translate the later changes in the target site.
    • Automatically update target variation pages: If the user wants to translate the content automatically when user publish the content in the source site, it will automatically translate the change in the target label.

    Target Label Behavior

  8. Review and Click on Finish to complete target variation label creation.
  9. Review label Settings

    Variation Labels

Create Variation Hierarchy

Once we create a Label for source and target, each label should create a variation sub-site based on the scheduled timer job (i.e., Variations Create Hierarchies Job Definition) for the Variation.

Click on “Create Hierarchies” link from Variation labels page in site settings that will invoke the timer job “Variations Create Hierarchies Job Definition”. This timer job will get executed based on its schedule.

Create Hierarchies

Once the hierarchies created successfully, “Hierarchy is Created” status on Variation Label page will change to “Yes” and sites are created successfully.

Hierarchies Created

SharePoint 2013 Variation Timer Jobs

SharePoint 2013 Variation feature content synchronization is a unidirectional process, it synchronizes content from a source variation site to one or many target variation sites.

To see the Timer Job go to Central administration > Monitoring > Review Job Definitions.

Below are the list of timer jobs involved in variations feature in SharePoint:

  • Variations Create Hierarchies Job Definition: Creates all variation sites, lists and pages from the source variation site. It runs hourly.
  • Variations Propagate List Items Job Definition: Creates and updates list items on target variation Default, every 15 minutes.
  • Variations Propagate Page Job Definition: Creates and updates pages on target variation after approved. Runs every 15 minutes.
  • Variations Propagate Sites and List Job Definition: Implements or executes variation sites and lists when the “Create Everywhere” option is enabled.  The process executes every 30 minutes.
  • Variation Feature

Above timer jobs are run automatically at above mentioned time interval.

If user want to run any Timer Job manually for specific requirements, then user can find above timer jobs from Central administration > Monitoring > Review Job Definitions.

Select “Web Application” from the View as shown in below screenshot.

Job Definitions

Select our Web Application from Web Application Dropdown.

Select Web Application

Click on the appropriate timer job to run it manually.

We can see the Edit Timer Job page, Click on “Run Now” to start the timer job manually.

Edit Timer Job

Variation Logs

During the variation process, there are several timer jobs to execute for the task completion. All activities related to Variation process are logged and collected under Variation logs list to provide details and troubleshooting any variation related issue such as Hierarchy creation, Page propagation, etc.

Variation logs are positioned beneath root site collection’s settings page.

Site Settings > Site Collection Administration > Variation logs

Variation Logs

Test Variation Features

Let’s test Variation feature by Syncing Custom list and Libraries in Variation:

  1. Create new list and create one item on source English site.Variation Item List
  2. Now open the Variations tab from ribbon. And click on “Settings”. Select the target label and click on continue. We will provide “Your new variations are on the way” message. Click on OK.

    Create Variation

  3. New Variation Created

  4. This list and list item will be created based on the Timer Job Scheduled. Once Timer Job Run this list will be created on the target Arabic site as shown below:Note: We can also manually run the below Timer jobs from central administration to propagate changes on target site.
    • Variations Propagate Sites and Lists Job Definition
    • Variations Propagate List Items Job Definition
    • Variations Propagate List Items

Web Parts behavior with Variation features

Web Parts are synced with pages of variation sites. If “Update Target Page Web Parts” is allowed, web Parts are refreshed only on the target variation site if a page that incorporates that web part is synced to the target variation site.

If the web part seems on various target pages on many target variation sites, all instances of the web part are modernized when the page from the source variation site is synchronized to the target variation sites.

For illustration, if a page possesses a Media Web Part, and the web part is configured to point to “Video A” that is stored on a site outside the variations hierarchy when the page is declared on the source variation site, the page is synchronized to all target variation sites. The pages on the target variation sites exhibit “Video A” in the Media Web Part.

If the page on the source variation site is refreshed and the Media Web Part is modified to point to “Video B”, the pages on the target variation sites stretch to point to “Video A” until the page on the source variation site is declared and synchronized to the target variation sites. Also, if readers on the target variation sites do not have permission to view the video file that is stored outside the variations hierarchy, they can’t observe the video.

Limitations

There are few limitations with Variation features in SharePoint Development:

  • We can use variation features only with the site(s) created using ‘Publishing site’ or ‘Publishing site with workflow’ templates. It is quite complicated to use feature stapling with OOTB site template for variation sites creation.
  • There can be only one root site variation per site collection.
  • There is only one way synchronization between the source language and target languages, we can synchronize content from source to target, but we cannot synchronize content from target to source.
  • Pages do not get synchronized until they are published. Therefore one version of the page has to be ready in source variation site before the target version of the page can even get translated and worked on.


Comments

Leave a Reply