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

Mohith Devatte
Tera Sage
Tera Sage

Hello @sheejajose ,

can you tell me the widget name that you are trying to use?

Musab Rasheed
Tera Sage

Hello,

Translated text means you need to enter sys id of record which I don't think is correct, if this is there in widget code then you can use getMessage() function and add entry in sys_ui_message table.

Please hit like and mark my response as correct if that helps
Regards,
Musab

@Musab Rasheed {{::options.title}} is in html code so getMessage() will not work is there any alternative to use in html?  

In the HTML, you can use ${} to translate text.

 

If you try to do ${{{::options.title}}} does that work?