.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Melody Anderson

Home >> Articles >> SharePoint >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Localization in SharePoint 2013 using Variations

Posted By:Jean Paul       Posted Date: December 31, 2014    Points: 200    Category: SharePoint    URL: http://www.dotnetspark.com  

In this article we will explore overview on Variations in SharePoint 2013.

In this article we can explore the Localization aspects of SharePoint 2013.


SharePoint 2013 includes a feature named Variations. Variations feature of SharePoint 2013 allows contents available to different language audiences. The source content is translated to target audience language.

Based on the browser language setting the user will get redirected to appropriate language site. Variations are implemented using:

1. Variation Root Site the landing site of all variation sites.

2. Variation Labels Label for a new Variation site.

3. Source Variation Site where shared content is authored & published.

4. Target Variation Site which will receive the content from source variation site.

5. Variation Lists are those specified in target variation labels.

Language Packs

Language Packs allow creation of Sites & Site Collections in multiple languages without need for separate SharePoint installation. This is a separate download from link.

Language Packs are required, but not mandatory for working with Variations Labels.

Machine Translation Service

Machine Translation Service Application allows translation of contents (documents, items) using Microsoft Translator. We need to configure the Service Application to avail this service.
The actual content will be sent to Microsoft for Translation. We need to explicitly inform the users about the underlying transmission.

Automatic content (files, sites) can be translated in this way. A timer job is assigned to perform the activity along with the Services & Service Applications. You need to ensure the Machine Translator Service Applications is running in the server.


How to setup Machine Translation Service?

Open Central Administration > Service Applications > Create new service application


Translation API

Machine Translation Service can be performed programmatically too:

1. Using Server Object Model

2. Using Client Object Model

Example from http://msdn.microsoft.com/en-us/library/office/jj163145.aspx

SPServiceContext sc = SPServiceContext.GetContext(new SPSite(site));

TranslationJob job = new TranslationJob(sc, CultureInfo.GetCultureInfo(culture));

job.AddFile(input, output);


Localizing Apps

Apps can be localized using Resource strings.


Example from http://msdn.microsoft.com/en-us/library/office/fp179919.aspx

var instructions = "Instructions:";
var step01 = "Go to any document library in the host web.";
var step02 = "Go to the Library tab.";
var step03 = "Click \"Request a book\" in the Settings group.";
var step04 = "Click the contextual menu in any document.";
var step05 = "Click \"Buy this book\" in the contextual menu.";
var step06 = "Go to any SharePoint page in the host web and add the" +
    " Bookstore orders app part.";
var step07 = "Review the localized <a href=\"../Lists/Orders\">Orders</a>" +
    " and <a href=\"../Lists/Order status\">Order status</a> custom lists.";
<script type="text/javascript">
    window.onload = function () {
        document.getElementById("instructions").innerText = instructions;
        document.getElementById("step01").innerText = step01;
        document.getElementById("step02").innerText = step02;
        document.getElementById("step03").innerText = step03;
        document.getElementById("step04").innerText = step04;
        document.getElementById("step05").innerText = step05;
        document.getElementById("step06").innerText = step06;
        document.getElementById("step07").innerHTML = step07;


For viewing Variation Settings, we need to Activate Publishing Infrastructure Feature in Site Collection features.

Activate Publishing Feature

To enable the Variation links, you need to activate Site Collection Features > SharePoint Server Publishing Infrastructure


Once you activate the feature, you can see Site Actions > Site Settings will have Variation links visible.


Variation Settings

Go to Site Settings > Variation Settings page.


The default option will automatically create variation contents. For example if your default language page is update, all existing target sites will be updated.

Creating Variations Label

You can go to Site Settings > Variation Labels to create a Variation Label.


Choose New Label to create a label.


You can see the References section on creation of source & target labels.


Please note that only Variations only work with Publishing site templates.




Create Variation Label


In this article we have explored overview on Variations in SharePoint 2013.

 Subscribe to Articles


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend