Translation of drop down values which are added from Catalog Client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-03-2020 01:03 AM
Hi,
we were able to translate all the drop down values which are added from Quetion choices or choices but the choices which are added from Catalog Client script using addOptions how to translate those?
- Labels:
-
Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2020 07:29 AM
HEllo Ankur,
I tried this solution, however when I use "g_form.addOption('field', getMessage('choice value'),getMessage('choice value'));" within which I user "choice value" as "key" of message then it actually prints key and not translated value. Please guide.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2023 09:27 PM
Hi Sir,
we have a On Change Client script condition based, when the child field choices is depends on Parent field.
When am trying to translate the choices in Thai language the condition is executed
What was the condition will write in the Client script to enable all the languages.
var region = g_form.getValue('please_select_your_payroll_region');
if (region == 'NAM') {
g_form.addOption('u_country', '5c6f6761db55bc1085d59d67b9961930', 'US QCI');
g_form.addOption('u_country', '206f6761db55bc1085d59d67b9961940', 'Canada');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-03-2020 01:34 AM
Hello,
You need to have the entry for each language
Eg:- If you are adding 5 option dynamically from script for 5 language, then you need to have 25 entries in message table, if you follow suggestion from Ankur.
How about dynamically translating the choice label based on user selected language?
I hope you have subscribed for at least one translator (Microsoft, Google, IBM watson etc..), You can pass the choice label to the third party translator and get it translated using your client script+script include. This way you dont need to store the translation any table.
I see you are in Madrid, The dynamically translations became much easier in Newyork and Orlando where the API calls for third party translators (Microsoft, IBM) are OOB (less code required).
Please mark my answer helpful/correct if it addresses your question.
Regards,
JAS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2020 08:07 AM
Hey follow below thread it did work for me.
https://community.servicenow.com/community?id=community_question&sys_id=c8e2ec80db46eb8011762183ca961927