← All articles
◈ Tech & ServiceNowServiceNowScripting

Handling Translations for System Messages in ServiceNow

Posted on 7 Feb 2018 · 1 min read

If your ServiceNow instance is going to be used in multiple languages, you need to think twice before hard-coding any messages — whether for backend users or Service Portal users.

The Problem with Hard-Coded Messages

Hard-coded messages (strings written directly in scripts, UI Policies, or client scripts) do not get translated automatically when a user changes their language preference. If you write "Please fill in this field" directly in a script, users who operate in Arabic or French will see that message in English.

The Solution: sys_ui_message Table

ServiceNow provides the sys_ui_message table specifically for this purpose. The table stores:

  • Your original message (usually in English)
  • Translations for each language you want to support

The table handles informational messages, confirmation messages, error messages, and other system messages.

How to Use It

Step 1: Navigate to System UI > Messages or directly to the sys_ui_message table.

Step 2: Create a new record with:

  • Key: a unique identifier for your message (e.g., fill_required_field)
  • Message: the English text
  • Language: English

Step 3: Create additional records with the same Key but different Language values for each translation.

Step 4: In your script, reference the message using:

gs.getMessage('fill_required_field')

Or in a client script:

getMessage('fill_required_field')

ServiceNow will automatically return the correct translation based on the user's active language.

The Discipline

Make it a team standard: any message that will be visible to end users goes through sys_ui_message. This simple discipline dramatically simplifies internationalisation and makes your instance truly multilingual.