Multilingual user interface: Is it possible to Export Translations using PowerShell?
-
28-09-2020 - |
Question
I have a SharePoint Server 2010 Enterprise with several language packs installed. The Alternate Languages have been enabled in the Site Settings and several items have been translated.
Is it possible to perform the action "Export Translations" using Site Settings > Site Administration > Export Translations using a PowerShell or STSADM command?
The same question also applies for using the action "Import Translations".
Solution
Out of the box of PowerShell cmdlets, It can't be done. It's no valid cmdlets in the Index of SharePoint Server 2010 Windows PowerShell cmdlets
However, Stefan Goßner wrote the blog post SharePoint Variations – The complete Guide – Part 16 – Translation Support which go over the topic in detail. He suggest to use PublishingService to export/import translations
Export/Import using the PublishingService
To allow automated translation of content SharePoint provides the export and import funcationality also through the ExportObjects and ImportObjects methods of the PublishingService web service which can be accessed using the following URL:
http://servername/site/_vti_bin/PublishingService.asmx
There is good documentation on how to use the web service for export and import on MSDN:
- PublishingService.ExportObjects Method
- PublishingService.ImportObjects Method
But to convert this to PowerShell methods take some effort and I havn't seen this done. I would write Console application instead to solve the problem at hand if you don't like to use Export Translation in your SharePoint GUI.