How To Translate Text In Widgets and the Pop-Up Notification (Via Catalog Client Scripts) in PORTAL?

Irene M
Tera Contributor

Hi everyone,

 

Good day!

 

I created a clickable link in Service Catalog using Widgets

 

IreneM_0-1665661391886.png

 

I did the configuration via Service Portal > Widgets.

I need help on how I can translate the "CLICK HERE" to a different language.

IreneM_1-1665661468003.png

 

I also need to translate the translate text inside the Pop-Up notification I created using the Catalog Client Script

 

IreneM_2-1665661789481.png

 

 

 

4 REPLIES 4

Sebastian L
Mega Sage

Translations for the portal is located in the sys_ui_message table. In order for it to be translated it need to have the following syntax: 

${Text to be translated}

or in the server script have the text assigned by gs.getMessage('Text to be translated'). 

The documentation for this can be found here: https://docs.servicenow.com/en-US/bundle/tokyo-servicenow-platform/page/build/service-portal/concept... 

 

Regarding translating client scripts, it is mostly the same, but you follow this documentation which explains it quite nicely: https://docs.servicenow.com/en-US/bundle/tokyo-platform-administration/page/administer/localization/... 


Best regards,
Sebastian Laursen

Hi Mr @Sebastian L Thank you for responding.

 

I am still not familiar with the translation. I tried following the documents your provided, but it didn't work. Can you show me how it's done properly?

Can you show me the code from the widget in the HTML and Server, so I can check if you have the correct syntax? 🙂

 

Also make sure that "Click here" is translated in the Messages table(sys_ui_message ) for the language you wish to translate it to. 


Best regards,
Sebastian Laursen

Alex Coope - SN
ServiceNow Employee
ServiceNow Employee

@Irene M,

So translations is a very very big topic. If you want a very high-level overview check out our "In-Platform Language Support Guide" which goes through how it works (across the platform) and what features you can leverage. 

Depending on how your widget is set-up, if it's text within HTML you would need to make sure it's not hard-coded, as I describe in this blog post,

Alternatively, if it's from the catalog item (not the widget, which is what I suspect), then the "Description" of the catalog item would almost certainly be an entry in the [sys_translated_text] table. How the 5 tables work I've posted here,

If you want to learn more about things in a kind of bite-size manner, check out our training course on NowLearning available here,

Alternatively, if you require some more help, feel free to send me an email and we can organise a session with my team,

Many thanks,
Kind regards

--------------------------------------------------------------------
Director of Globalization Deployment, Internationalization