7

I am using powershell to manage the creation of some site variations following this tutorial:

http://www.sharepointeurope.com/blog/2013/7/23/automate-variations-in-sharepoint-2013-using-powershell-c

enter image description here

It is working but now I need to enable Human Translation and Machine Translation. How can I do that using powershell?? Currently I am using the below code. In Allow human translation it shows that No column found. Same for Allow machine translation. It shows me no column found. Please help.

$item = $list.Items.Add();
$item["Title"] = $label_DE_Title;
$item["Description"] = $label_DE_Description;
$item["Allow human translation"]=$true;
$item["Language"] = $label_DE_Language;
$item["Locale"] = $label_DE_Locale;
$item["Hierarchy Creation Mode"] = $label_DE_HierarchyCreationMode;
$item["Is Source"] = $label_DE_IsSource;
$item["Hierarchy Is Created"] = $false;
  • Try to get the fieldname with $list.Fields | fl – Max Melcher Jan 13 '14 at 7:13
5

You need to set correct properties while creating Variation Labels, see example for Swedish label (c#) when both Machine and Human Translations are enabled using MachineTranslationEnabled and HumanTranslationEnabled

                    Title = "sv-SE",
                    FlagControlDisplayName = "Svenska",
                    Language = "sv-SE",
                    Locale = 1053,
                    HierarchyCreationMode = CreationMode.PublishingSitesAndAllPages,
                    IsSource = false,
                    MachineTranslationEnabled = true,
                    HumanTranslationEnabled = true,
                    HumanTranslationLanguage = 1053

Could you use IsMachineTranslationEnabledField and IsHumanTranslationEnabled with PowerShell to see if you're referring to correct columns? Sorry, I can't test it myself at the moment

  • 1
    Hi,That is what i would like to know is what is column name for Human and Machine Translation. I have try Allow human translation,Human Translation, HumanTranslationEnabled ..but nothing is working and it shows me column not found. Can you please tell me from where can i check column name – user1337886 Jan 11 '14 at 11:58
0

The column name is "Is Machine Translation Enabled".

This worked for me

$item["Is Machine Translation Enabled"] = $true;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.