Cognitive Page Translation
Overview
LiveTiles Intranet Hub introduces a Cognitive Page Translation feature using the Azure Translator. Using our Action Menu
, users can now translate their SharePoint page in one of
the preferred languages set by the Intranet Hub Admin
.
For safety reasons, they key for the Azure Translator will be stored as a Storage Entity using PowerShell.
Prerequisites
-SharePoint Online Management Shell -PnP Package
Follow this tutorial for installing these prerequisites: Tutorial_PnP
Setting up the Translator Key
As mentioned before, this feature uses the Azure Translator, which can be set up by an authorized person in your company or by the LiveTiles Intranet team.
The first step is to connect to the Admin Center, using this PowerShell command:
Connect-PnPOnline -Url https://yourtenant-admin.sharepoint.com
The second steps consists of creating the Storage Entity:
The Storage Entity uses a Key-Value pair, so in order for LiveTiles Intranet Hub to pick up this pair, an authorized person needs to add this pair using this command:
Set-PnPStorageEntity -Key <String> -Value <String>
The name of the -Key must
be TranslationKey
and the -Value must be a string that contains the key for the Azure Translator.
For example:
Set-PnPStorageEntity -Key TranslationKey -Value MY_AZURE_TRANSLATOR_KEY
Once the Storage Entity has been setup, the Intranet Hub Admin can now add this feature inside the features
node inside the Intranet Hub Global Configuration.
Setting up the Cognitive Translations feature inside the Intranet Hub Global Configuration
The Cognitive Translations feature needs to be enabled inside the features
node inside the Global Configuration. This can be done by adding a node called cognitiveTranslation
inside the features
node.
Inside this cognitiveTranslation
node, the Intranet Hub Admin must provide a couple of other nodes:
- The
enabled
node will point to LiveTiles Intranet Hub that this feature is enabled and ready to be used - The
region
node contains the region where the Azure Translator is set up - The
supportedLanguages
contains an array of language codes, configured by the Intranet Hub Admin, which represent the languages in which the content will be translated in
Configuration example:
"features": {
"cognitiveTranslation": {
"region": "westeurope",
"enabled": true,
"supportedLanguages": [
{
"code": "en"
},
{
"code": "fr"
},
{
"code": "nl"
},
{
"code": "de"
}
]
},
...
}
Once this configuration has been set up, the Action Menu
should have an entry called Page Translation
:
For translating the page, the user should click on the Page Translation
entry and choose one of the preferred languages from the dropdown:
In case the user does not want to translate the page, they can click on the Back to Default Options
entry. This will take the user back to the default entries.