Translation – Messages

If your system is going to be used in multiple languages you might need to think twice before you hard code any message for your backend users or Service portal users.Hard coded messages don’t get translated automatically when a user changes languages, in this case what you need to do is to add the message that you want to display on sys_ui_message table which contains your original message as well as the translations for informational messages, confirmation messages, error messages, and other types of system messages.

ServiceNow checks this table for translation when a client script contains a getMessage or a server script contains gs.getMessage call.

The main fields for this table are:
Application: name of the application this message appears in.
Key: internal unique identifier of this message.
Language: language the message is translated into.
Message: translated text that users see.

Here is example:


// Hard coded message
gs.addInfoMessage('Please select the right service for this case');
//gs.getMessage() is going to call value for escalation_msg key, the value displays depend on user's language
gs.addInfoMessage(gs.getMessage('escalation_msg'));

Navigate to System Localization > Messages and then  create message for escalation_msg key in both English and French


When the code above triggers, it prints 2 messages in English

When user changes language to French

Hard coded message displays in English while the other one displays in French


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s