- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.