SharePoint 2013 Multilingual and Translation Services

Language Packs

SharePoint comes with an add-on installation for language packs.  In order to provide a multilingual experience, and to configure variations, these languages must be downloaded and installed.  Note: For variations and human or machine translation, only steps 1-6 are necessary.

Install and Configure a Language Pack

  1. Navigate to the SharePoint 2013 Language Packs for the language you need.  Download and install on every farm server (not database).  You may have to purchase this or contact you enterprise agreement to obtain a new language.   You can also get these from MSDN.  I will be testing Spanish.
  2. This install took an hour on my development server.
  3. Afterwards a window pops up with the Run the SharePoint Products and Configuration Wizard prompt checked, leave it checked and click close to run the config wizard.  Or run the PowerShell psconfig command.
  4. Run the config wizard, note that some disruption to services are possible, so this should be treated as a cumulative update outage.
  5. SharePoint Products Configuration Wizard must run to complete Install
  6. Hopefully next you are informed the configuration was successful and click Finish.
  7. If errors occur open the install log and troubleshoot.  Then rerun the wizard from the Start menu.
  8. Here is a screenshot of the TEMPLATE folder on the server after installing the new language pack “3082” for Spanish.  1033 is US English.
  9. The new folder for Spanish is 3082

Create a Site Collection in a Different Language

To create a new site collection with a different language, you must specify the locale ID (LCID) and the only way this is possible is to create a site collection using PowerShell.
  1. Open elevated PowerShell interface with SharePoint snapin loaded.
  2. Run this command to get all the web template IDs:
  3. PowerShell Code
    # To get a list of all web templates, use the following PowerShell code
    function Get-SPWebTemplateWithId
    {
    $templates = Get-SPWebTemplate | Sort-Object "Name"
    $templates | ForEach-Object {
    $templateValues = @{
    "Title" = $_.Title
    "Name" = $_.Name
    "ID" = $_.ID
    "Custom" = $_.Custom
    "LocaleId" = $_.LocaleId
    }

    New-Object PSObject -Property $templateValues | Select @("Name","Title","LocaleId","Custom","ID") }
    }

    Get-SPWebTemplateWithId | Out-GridView
  4. Run this command to get the web template ID of the site you plan on translating (Change the SiteUrl to your site collection URL):
  5. PowerShell Code
    # Find the template name of SharePoint site using PowerShell
    $web = Get-SPweb http://SiteUrl
    Write-host “Web Template:” $web.WebTemplate ” | Web Template ID:” $web.WebTemplateId
  6. Create a new content database and a site collection using the same template found from the command in (3).  Change the variables.  Use this guide for LCIDs: http://msdn.microsoft.com/en-us/goglobal/bb964664.aspx
  7. PowerShell Code
    $ContentDB = "SP2013_Dev_Content_Pub_Spanish"
    $SQLServer = "SPSQLALIAS"
    $WebApp = " http://dev-sp13-01"
    $SiteCollURL = " http://dev-sp13-01/sites/spanish"
    $SiteCollName = " Publicación "
    $PrimaryOwner = "dev\svc.sp13.setup"
    $SecondaryOwner = "dev\ejochens"
    $SiteTemplate = "BLANKINTERNET"
    $Language = "3082" #Decimal Format. This matches the folder generated in LAYOUTS.

    # CREATE THE NEW CONTENT DATABASE
    New-SPContentDatabase $ContentDB -DatabaseServer $SQLServer -WebApplication $WebApp -MaxSiteCount 1 -WarningSiteCount 0

    # CREATE THE SITE COLLECTION INSIDE THE NEW CONTENT DATABASE
    New-SPSite $SiteCollURL -Name $SiteCollName -OwnerAlias $PrimaryOwner -SecondaryOwnerAlias $SecondaryOwner –Language $Language -Template $SiteTemplate -ContentDatabase $ContentDB
  8. The Newly created Spanish site collection looks like the image below.  Note though that this site will not be used for machine translation.  This would be useful for a standalone site in another language. This could be used for an organization in which Spanish is the primary language and they wish to setup variations from here as the source to convert it to English.
  9. Spanish Site Collection

    Multilingual Site using Variations

    The variations feature in SharePoint Server 2013 makes content available to specific audiences on different sites by syncing content from a source variation site to each target variation site. When users visit the root site, they are redirected to the appropriate variation site, based on the language setting of their web browser. Content on a target variation site can be translated into other languages before it is published. Variations can be used only on sites that are created by using one of the Publishing site templates, or on sites for which the SharePoint Server Publishing Infrastructure feature was activated.

    TechNet References:

    Steps:

    1. In my development server, I installed the language packs, this will give the entire site the ability to navigate and operate in another language.
    2. Navigate to the site collection where content will be authored.  It may make sense to create a separate publishing site just for authoring content.
    3. Navigate to Site Settings -> Site Collection Administration -> Variation Settings.  You may leave this as default, but experiment in the future if you wish to alter how you translate.
    4. Go back to Settings and click on Variations Labels.
    5. Setup this site as the source.  It should use the default setting for your environment.  In my development system I chose / as the root, so I am going to translate this entire site collection into US Spanish.
    6. The Source Label after Creation
    7. Notice Human Translation and Machine Translation are disabled?  This is because this is the source and will remain unchanged.
    8. Also the URL for this site is: http://dev-sp13-01/sites/pub/en-us, the site was created as a team site with publishing feature enabled, at http://dev-sp13-01/sites/pub/.  So it adds the label to the source “en-us”.
    9. Click the link “New Label”.  These are the languages we build to translate the source into.
    10. If the language has been installed properly on the servers, then a new Language shows up in the first drop-down:
    11. A Language Only Exists if the Language Pack is Installed
    12. Ensure the new site has the Variations configured.
      1. The default page for this site collection will have changed to the source URL with en-us in the path.
      2. Navigate to the newly created URL for the source variation, which is en-us, Example: http://dev-sp13-01/sites/pub/en-us.
      3. This site will need to be published, run the workflow to publish the home page.
      4. Navigate to Site Settings -> Site variation settings.
      5. In my example I will check the box next to the es-us, to set the target variation from this site.
      6. A notice tells you a site will be created, but only according to the schedule set in the Central Administration Timer Jobs for Machine Translation (3 of them).
    13. After the jobs run, navigating to the new Spanish Variation, Example: http://dev-sp13-01/sites/pub/es-us, displays a complete Spanish version of the same site, complete with Spanish words for system pages.
    14. Site Settings in the new Spanish Variation
    15. In order to test the variations, I need to go to the source site collection (http://dev-sp13-01/sites/pub/en-us), upload a document into a document library, and investigate the variations settings. Here you can see the document library has the variations settings in the ribbon:
    16. Lists and Libraries have the Variations Menu
    17. Click on Settings, and now I can choose the label I want this document library to be translation into:
    18. Enabling Content to use a Label (Translate it)
    19. The next morning I checked the Spanish variation of the document library and the document had in fact been converted and placed properly:
    20. The variation is Translated on the Spanish Site

    21. The same behavior should occur for pages and web parts on pages as well.

    Comments

    1. You most definitely have made this blog into something that's eye opening and important. You clearly know so much about the subject, you've covered so many bases. Visit Now

      ReplyDelete
    2. Hi Eric,

      Did you noticed, custom pages from pages library are not getting copied to destination site?
      Also, lists with lookup columns are note getting translated either.

      Do you have any work around for this one.?

      Thanks
      Vishal

      ReplyDelete

    Post a Comment

    Popular posts from this blog

    SharePoint Designer 2013 Approval Workflow with Comments

    Change SharePoint server hostname and Web Application Names

    The Timer Service Failed to Recycle