The Zurich release has arrived! Interested in new features and functionalities? Click here for more

SumanthDosapati
Mega Sage
Mega Sage

Debugging Language Translations in ServiceNow

 

There are quite a number of questions posted in community related to language translations in ServiceNow.

This small article might help you for debugging how translations are configured in ServiceNow and how can you debug it easily to make your development easier.

Translations in ServiceNow might come from these below 6 tables.

  • Languages [sys_language]
  • Translated Name / Field [sys_translated]
  • Message [sys_ui_message]
  • Field label [sys_documentation]
  • Choice [sys_choice]
  • Translated Text [sys_translated_text]

 

If you want to find out directly from which table a translation came in then :

 > Type "Enable I18N Debugging" in left navigator

     find_real_file.png

 > Click on it

 > Open the portal and page where you want to debug or find out 

 > Reload the browser

 > Now you will see a prefix for each string on the screen

find_real_file.png

 

 > Based on the Prefix you see, you can get the table name as below

 

PrefixTable
TRFTranslated Name / Fields [sys_translated]
MSGMessages [sys_ui_message]
GMLDField Label [sys_documentation]
TRTTranslated Text [sys_translated_text]
CHCChoice [sys_choice]

 

Once your debugging is completed, you can type "Disable I18N Debugging" in the application navigator or logout from the session.

If you want the translation prefixes for all the sessions then set the property "Display translation prefix on translatable strings" to 'Yes'

See below examples to understand what each different table means and what kind of translations these tables might store.

sys_translated : Variables names in service portal, Text on Ui actions in native UI

sys_ui_message : Info messages, service portal widget messages

sys_documentation : table names, singular and plural of field labels in tables

sys_translated_text : Catalog item name, catalog item description in portal

sys_choice : Drop down options, choices in select box variable

So, using the l18N debugging you can easily find out from which table translations are being done for each string.

 

Feel free to comment for any queries or suggestions. If this article helps you, share it with your fellow developers and mark as helpful.

Regards,
Sumanth

Comments
Lakshmi I
Kilo Explorer

Helpful content!!!

Alex Coope - SN
ServiceNow Employee
ServiceNow Employee

@Sumanth Dosapati,

Great post, 

For the sake of consistency for others, are you familiar with our dedicated i18n forum here, which goes into this and other more advanced concepts on the topic? 

Many thanks,
Kind regards

Raju DRK
Kilo Explorer

Useful

timjeoung
Tera Contributor

Hi, thanks for sharing these awesome tips!

 

Just one question, when we do debugging some values do not have any prefixes. Does that mean we can not translate for that value? If yes, how can we make it to have a prefix?

 

Alex Coope - SN
ServiceNow Employee
ServiceNow Employee

@timjeoung if you do not see a prefix, then that's what we call a "hardcoded string" (which is bad because as it is it can't be translated). 

There are quite a few reasons in code that cause it, but they should all be fixable, have a look at my blog post here for our "Instance Scan Definitions" to help find such issues in your code,

Many thanks,
kind regards

srlc2025snow
Tera Contributor

srlc2025snow_0-1741069083512.png

 

 

Actually I'm facing an issue in this table. Inside the body its not translating to japanese. how to solve the issue

 

Alex Coope - SN
ServiceNow Employee
ServiceNow Employee

@srlc2025snow,

This is translated via the Localization Framework following the steps detailed here,

For more info on the wider subject of how to translate in the platform, please review our "In-Platform Language Support Guide" thread,

Many thanks,

kind regards

 

Version history
Last update:
‎06-10-2022 03:03 AM
Updated by: