How To Translate Text In Widgets and the Pop-Up Notification (Via Catalog Client Scripts) in PORTAL?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2022 04:50 AM
Hi everyone,
Good day!
I created a clickable link in Service Catalog using Widgets
I did the configuration via Service Portal > Widgets.
I need help on how I can translate the "CLICK HERE" to a different language.
I also need to translate the translate text inside the Pop-Up notification I created using the Catalog Client Script
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2022 05:22 AM - edited 10-13-2022 05:23 AM
Translations for the portal is located in the sys_ui_message table. In order for it to be translated it need to have the following syntax:
${Text to be translated}
or in the server script have the text assigned by gs.getMessage('Text to be translated').
The documentation for this can be found here: https://docs.servicenow.com/en-US/bundle/tokyo-servicenow-platform/page/build/service-portal/concept...
Regarding translating client scripts, it is mostly the same, but you follow this documentation which explains it quite nicely: https://docs.servicenow.com/en-US/bundle/tokyo-platform-administration/page/administer/localization/...
Best regards,
Sebastian Laursen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2022 06:53 AM
Hi Mr @Sebastian L Thank you for responding.
I am still not familiar with the translation. I tried following the documents your provided, but it didn't work. Can you show me how it's done properly?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2022 06:58 AM
Can you show me the code from the widget in the HTML and Server, so I can check if you have the correct syntax? 🙂
Also make sure that "Click here" is translated in the Messages table(sys_ui_message ) for the language you wish to translate it to.
Best regards,
Sebastian Laursen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2022 06:00 AM
@Irene M,
So translations is a very very big topic. If you want a very high-level overview check out our "In-Platform Language Support Guide" which goes through how it works (across the platform) and what features you can leverage.
Depending on how your widget is set-up, if it's text within HTML you would need to make sure it's not hard-coded, as I describe in this blog post,
Alternatively, if it's from the catalog item (not the widget, which is what I suspect), then the "Description" of the catalog item would almost certainly be an entry in the [sys_translated_text] table. How the 5 tables work I've posted here,
If you want to learn more about things in a kind of bite-size manner, check out our training course on NowLearning available here,
Alternatively, if you require some more help, feel free to send me an email and we can organise a session with my team,
Many thanks,
Kind regards
Director of Globalization Deployment, Internationalization