Translation in virtual agent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2024 08:02 PM
I have created a topic and setup topic for custom greetings. In both the flow, I have added the French translation. For complete flow translation is working as expected. But for below greeting line it is coming in English only, it is not getting translated as required.
"Greeting {0}! \n I am your Virtual agent........".
Where {0}, we are taking logged in username.
Is there any possibility where it can be resolved?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2024 02:18 AM
Yes, you can resolve this issue by using the gs.getMessage() method in your script. This method is used to localize messages based on the user's language preference. Here are the steps:
1. First, you need to create a message record for the greeting text.
- Navigate to System Localization > Messages in ServiceNow.
- Click on New to create a new message.
- In the Key field, enter your English greeting text "Greeting {0}! \n I am your Virtual agent........".
- In the Language field, select French.
- In the Message field, enter your French translation.
- Click on Submit to save the message record.
2. Next, you need to modify your script to use the gs.getMessage() method.
- In your script, replace the greeting text with gs.getMessage("Greeting {0}! \n I am your Virtual agent........", userName).
- Here, userName is the variable that holds the logged-in username.
3. Test your flow.
- Log in with a user who has French as their language preference.
- The greeting should now be displayed in French.
Remember, the gs.getMessage() method retrieves the message based on the user's language preference. If the message for the preferred language is not found, it will default to the English message.
For ServiceNow Live Classes, Books, Sample Resumes, Interview Questions, CSA Quizzes.
And getting better services's on ServiceNow you can visits our website.
Please visit : https://nowkb.com/home
Our Website :https://nowkb.com/home
nowKB.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2024 11:04 PM
Hi Ramesh,
Thank you for your response.
I tried above steps, but it is not working for me.
the greeting message still comes in English only.