Show language-based error messages on service portal
New article articles in ServiceNow Community
·
Jul 10, 2026
·
article
In ServiceNow Portal (Service Portal / Employee Center), if you want to show language-based error messages without much custom development and as close as possible to OOTB (Out of the Box), use Message Translation and gs.getMessage().
Use System Localization Messages (Recommended):
Navigate to:
System Localization → Messages
Create a message:
Key: invalid_user_error
Message (English): Invalid user selected.
Create translations for the same key:
Language: French → Utilisateur non valide sélectionné.
Language: German → Ungültiger Benutzer ausgewählt.
Language: Japanese → corresponding translation
than In Portal Widget or Server Script:
gs.addErrorMessage(gs.getMessage('invalid_user_error'));
This process in ServiceNow automatically displays the message based on the logged-in user's language preference.
https://www.servicenow.com/community/developer-blog/show-language-based-error-messages-on-service-portal/ba-p/3571670