The CreatorCon Call for Content is officially open! Get started here.

How to translate the value in {{::options.title}} in service portal widget

sheejajose
Mega Expert

Hi Team,

 

I enabled i18N plugin and the text I want to translate is shown as TRT (Translated Text) and I provided the translated value in the translated text table, but the value is not getting translated. In the widget it is given as {{::options.title}} 

How can this dynamic value be translated?

 

Regards,

Sheeja

 

 

1 ACCEPTED SOLUTION

Marek Vitek
Giga Guru

With portal widgets you can simply translate by switching to appropriate language.

 

1) go to widget options - Ctrl+Right click on widget

MarekVitek_0-1669319029046.png

 

2) then from hamburger menu choose Open in platform

MarekVitek_1-1669319172822.png

 

3) at the bottom of the page on the tab Presentation you can find Title which you can edit for language you are currently switched to.

MarekVitek_2-1669319286169.png

 

4) to edit it in another language simply switch Service now to desired language and edit this field.

Note that Title field if of type translated_text.

View solution in original post

9 REPLIES 9

sheejajose
Mega Expert

Hi @Mohith Devatte 

HRI Onboarding My Tasks

sheejajose_0-1669299141170.png

 

@sheejajose try this 

in the below screenshot you can observe the line no 4 in server script you need to change to 

gs.getMessage($sp.getValue("title"));

 

Screenshot 2022-11-24 at 19.51.26.png

Hope this helps 

If it works mark the answer correct

Thanks

Marek Vitek
Giga Guru

With portal widgets you can simply translate by switching to appropriate language.

 

1) go to widget options - Ctrl+Right click on widget

MarekVitek_0-1669319029046.png

 

2) then from hamburger menu choose Open in platform

MarekVitek_1-1669319172822.png

 

3) at the bottom of the page on the tab Presentation you can find Title which you can edit for language you are currently switched to.

MarekVitek_2-1669319286169.png

 

4) to edit it in another language simply switch Service now to desired language and edit this field.

Note that Title field if of type translated_text.

Thank you @Marek Vitek 

Thank you so much. I wish ServiceNow will make this a bit easier in the future 🙂