
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 06-10-2022 03:03 AM
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
> 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
> Based on the Prefix you see, you can get the table name as below
Prefix | Table |
---|---|
TRF | Translated Name / Fields [sys_translated] |
MSG | Messages [sys_ui_message] |
GMLD | Field Label [sys_documentation] |
TRT | Translated Text [sys_translated_text] |
CHC | Choice [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
- 6,628 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Helpful content!!!
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
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
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Useful
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
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?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@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
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Actually I'm facing an issue in this table. Inside the body its not translating to japanese. how to solve the issue
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@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