logo

NJP

Q: Help!!! (How) can I translate this? A: Have you had a look at I18N Debugging?

Import · May 18, 2021 · article

Virtual Agent web client

image

Here an image of the Virtual Agent web client that displays a custom greeting topic with I18N Debugging enabled. Notice the translation prefixes on most of the messages, in this case MSG.

So if you are after translating for example "Good afternoon Mark." the place to be would be MSG, Messages. Most like the key for this would be "Good afternoon", "Good afternoon {0}", or "Good afternoon {0}.". Here's an image of the Message involved:

image

Also notice that the second message is not prefixed. So this would indicate… that you can't translate this one using Message, Translated Text, etc.. In this case this is also correct, on purpose I scripted this message without using gs.getMessage() or gs.getMessageLang().

image

Another image of the Virtual Agent web client which displays a custom greeting topic with I18N Debugging enabled. I18N Debugging is also helpful to spot words and phrases which cannot be translated. Like explained in the previous message. This image also shows some other areas which cannot be translated. For example you might want to have the Chat Header translated? No go. Or what about the month on the Date Picker, a recently asked question on the community. No go.

Idea Portal

image

Here an image of a small part from the Idea Portal with I18N Debugging enabled. A recently asked question on the community concerned if/how it would be possible to translate the categories. Notice that "All categories" is prefixed, though the categories themselves ("Compliance Project", "Human Resource/Employee Engagement", etcetera) are not! This would indicate that the categories themselves are not translateable, that the widget (or depending artifacts) have not been set up to support translations. While digging into the Service Portal widget, I indeed confirmed that this was not set up to support translations out-of-the-box image A slight mistake from ServiceNow, though with using I18N Debugging quickly already discovered the issue mentioned in the community post.

Visual Task Board

image

The last example, haven't had any questions on this before, though just to give you an idea. Here an image of a Vusal Task Board with I18N Debugging enabled. The Visual Task Board code cannot be accessed/edited, this concerns the $vtb.do page. Though can we translate some of the words or phrases on it? As highlighted in the image, a lot can be translated even though you cannot access/edit the code of the Visual Task Board.

Recap

By adding some simple I18N Debugging, you could quickly pinpoint what you go to might be in your search for translating words or phrases. Instead of assuming its Messages, directly editing scripting, or wondering why something is not translatable… and eventually after spending hours on this, posting it on the ServiceNow Community, maybe waiting again some hours or even days before someone pinpoints your issue… apply I18N Debugging first!

---

If any questions or remarks, let me know!

Kind regards,

Mark Roethof

ServiceNow Technical Platform Architect @ Quint Technology

2x ServiceNow Developer MVP

2x ServiceNow Community MVP

---

LinkedIn

View original source

https://www.servicenow.com/community/international-localization-blog/q-help-how-can-i-translate-this-a-have-you-had-a-look-at-i18n/ba-p/2291680