Fix variation labels with a wrong locale

Last week, I was doing some support for a customer which had some issues with variations on their intranet which is based on SharePoint 2010.
They have 3 variations:

  • English (Source)
  • Dutch
  • French

While investigating an issue, I started playing around with the browser language and noticed the following  :

  • Browser language = English => Redirect to the “English” variation
  • Browser language = Dutch => Redirect to the “English” variation
  • Browser language = French => Redirect to the “French” variation

Dutch users were redirected to the English site… awkward. I looked at the variation labels and it was pretty clear why this was happening.

011614_1034_FixVariatio1

The english variation is created with the “Dutch” locale. The problem with this is… you can’t change it once it has been created.

011614_1034_FixVariatio2

The solution for this lies in PowerShell. Variation labels are stored in a hidden list on the root web of the site collection and is called “Variation Labels”.

To change the locale, you can use the following script:

Just replace the URL for the site with the url where the variation hierarchy has been created and the “English” with the title for the variation label with the wrong Locale.
Once this is done, the Locale of the variation label is changed and the users are directed to the correct site.

011614_1034_FixVariatio3