Need help with help text translation

sanga2
Tera Contributor

HI All,

 

I need help with the translation of a help text. The help text should only be visible when we select 'laptop' choice in the field 'what do you need?'. If the user selects any other field then the help text should not be visible. I have written a UI policy for the same and used "g_form.showFieldMsg" to populate the help text, which is working fine.

 

However, we need to trnaslate the help text based on the language selected by the user. For this I have created a record in to the table "sys_translated_text", but still it is not translating the text to french.

 

Is this because I'm updating the help text through a script? what should I do to translate the help text?

3 REPLIES 3

Sandeep Rajput
Tera Patron
Tera Patron

Hello @sanga2 

 

You need to create the translations of the help text within sys_ui_message table in ServiceNow. 

Screenshot 2023-04-10 at 3.40.53 PM.png

The key here would remain same for both the messages, only the translation and language would differ here.

 

Following is the way you will use this key at the client side.

Screenshot 2023-04-10 at 4.18.58 PM.png

Please note that you need to paste the key in messages section, this allows the browser to cache this key so that next time it will not take much time to load the same message. 

 

Hope this helps.

Pavankumar_1
Mega Patron

Hi @sanga2 ,

Help text is different and field messages are different.

If you need to translate field messages then try as suggested by Sandeep below.

If you need translate the Help text which will be available on Annotation tab of a variable then need to create a record in sys_translated_text table and table Name should be question and document is your catalog variable, field anme is help text.

Refer below

Screenshot (745).png

 

If it helps please click Accept as Solution/hit the Thumb Icon.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar

Pavankumar_1
Mega Patron

Hi @sanga2 ,

If my response helps you to resolve the issue close the question by Accepting solution and hit thumb icon. From Correct answers others will get benefited in future.

If it helps please click Accept as Solution/hit the Thumb Icon.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar