How to translate a variable filed message to user preference language

Joshuu
Kilo Sage

Hi All,

 

I have a variable on catalog form which has a show field message for a variable as shown below. And I am trying to translate this to different languages and I have created a record in translated text table but it is not working. Is this the right table to translate the field message of a variable?

 

priyarao_1-1685946384976.png

 

priyarao_0-1685946260364.png

Please help me.

 

Thank you.

 

1 ACCEPTED SOLUTION

Hi @Joshuu ,

I have configured messages and 'onChange' catalog client script on priority variable as below

SudhirGullapal_0-1685952911663.png

Catalog client script:

SudhirGullapal_1-1685952937835.png

 

Please, mark answer correct or helpful based on the imact.

Thanks,

Sudhir G

View solution in original post

7 REPLIES 7

Mark Roethof
Tera Patron
Tera Patron

Hi there,

 

This concerns a single line text or multi line text variable? Which is used on a Catalog Item which you are submitting through for example Service Portal/Employee Center/etc?

 

If so, what you are after is not possible out-of-the-box.

 

Kind regards,
Mark

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Hi @Mark Roethof ,

 

This variable is a select box which has 3 choices Low, Medium, and High. And based on the user selection the the field message will display according to the choice selected.

 

Can we translate it to other languages?

See this article which I wrote a few years ago:

- 2019-11-19 - Article - Catalog Client Script Messages (Internationalization/Multi-Language)

 

Kind regards,
Mark

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

SudhirG
Kilo Sage

Hi @Joshuu ,

For field messages you need to add translations in the 'sys_ui_messages' table an client script use getMessage('key') function. It will fetch the translations based on the user's language preferences.

For more information check this below link.

https://docs.servicenow.com/en-US/bundle/utah-platform-administration/page/administer/localization/t...

 

 

Please, mark answer correct or helpful based on the imact.

Thanks,

Sudhir G