Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Translate the menu items in Service Portal Header

Community Alums
Not applicable

Hi community,

currently, we develop a customer portal with service portal. Our users speak French or English so we want to translate all the labels.

We use the ${word} syntax to translate the static text in wdigets and it works fine.

Now, I'm looking for the solution to translate the menu items in the header.

Here is my analysis :

  • This is set in the "Header Menu" widget.
  • The menu settings are related to my theme "sp_rectangle_menu_item" (stored in the "" table) => See the attachment.
  • The template used on my theme is an angular ng-template "menuTemplate" (stored in the "sp_ng_template" table) :

<a ng-if="item.items.length == 0 && !item.scriptedItems" ng-href="{{item.href}}">{{item.labe}}</a>

<a ng-if="item.items.length > 0" href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">{{ item.label }} <span class="caret"></span></a>

...

I have tried that ${{{item.label}}} but doesn't work !

Do you know how I can translate the {{item.label}} value ?

3 REPLIES 3

Community Alums
Not applicable

Hi everyone,


Finally, I have found the solution to translate the menu items in Service Portal :


Menu Item labels are stored in a field with a translated_text field type. This means in order for it to be translated, a translation record must exist on the Translated Text [sys_translated_text] table.



1. Select System Localization > Translated Text on the Application Navigator


2. Select New.


3. Configure the record in this order.


  • Table Name : Menu Item [sp_rectangle_menu_item]
  • Language : French
  • Field Name : Label
  • Value : Liste des incidents (translation)


Regards


Christophe


If I would translate the subcategories of header menu item?


Community Alums
Not applicable

Hi Gaetano,


I don't use subcategories for the moment so I can't try it. I think you can use the same method.



Regards