How to put dynamic translator in portal and how to configure the default language

Junyu
Tera Contributor

Dear all,

I finisehd the Language Translation in ServiceNow using Microsoft Azure Translation Service part for my incident:

find_real_file.png

But it doesn't work on my portal:

find_real_file.png

How to put dynamic translator on portal and how to configure the default language for each user (If the user is from Spain, it will be translated to Spanish by default)?

 

Looking forward to your feedback.

7 REPLIES 7

Priya60
Tera Contributor

Priya60_0-1701065295085.png

Priya60_1-1701065355810.png

 

Updated "sn.dt.activity_stream.allow_list" property for Incident table. Still not able to see translation on portal. Can you please help.

 

Which conversation widget are you using in the portal? Is it the Standard Ticket Conversations or the Ticket Conversations? Can you check that the code logic for Translation is added to the widget.

 

For example the HTML needs to have

 

<div ng-if="e.showTranslation" class="translation-container">
<div ng-if="e.isTranslationInProgress">
<i class="translation-icon icon-translation"></i>
<span aria-live="polite">{{::data.translation.translationProgressMsg}}</span>
</div>
<div ng-if="e.isTranslationSuccess">
<i class="translation-icon icon-translation"></i>
<a class="translate-link" href="javascript&colon;void(0)" ng-click="toggleTranslation(e)">{{e.toggleMsg}}</a>
<span class="translation-delimiter">•</span>
<span class="translation-credits">{{e.credits}}</span>
<p ng-if="e.showDetails && !c.data.isCodeAllowed" class="translation-message" ng-bind-html="::trustAsHtml(e.translatedText)"></p>
<p ng-if="e.showDetails && c.data.isCodeAllowed" class="translation-message" ng-bind-html="::e.translatedText"></p>
</div>
<div ng-if="e.isTranslationError">
<i class="translation-icon icon-translation"></i>
{{e.translatedText}}
<a ng-if="e.tryAgain" href="javascript&colon;void(0)" class="translate-link" ng-click="translateText(e, true)">{{::data.translation.tryAgainMsg}}</a>
</div>

 

There is also Client and Server scripts.

Priya60
Tera Contributor

We are using OOB - "Standard Ticket Conversations" widget. It has all these scripts enabled. Do we need to configure anything else to enable in portal? Please suggest