- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2017 11:54 AM
In the Service Catalog Variable XYZ values are dependent on the variable ABC values. To populate the values in XYZ dynamically I've used a catalog client script. I did not create any choice in catalog items for XYZ. Now the requirement is the variables need to be translated in different languages. I've translated most of them but the choice list in XYZ is not translated as they are dynamically created using catalog client script. How to translate the values in the catalog client script in different languages?
1) We can do it manually by scripting the translated choice list. But, it is time consuming.
Is there any way to achieve this?
Note: Values in XYZ are visible based on the values selected in ABC. Catalog script is used to display those values.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2017 11:58 AM
This was not working. But I figured out a way to translate the dynamic variables, we can translate it in the messages and use getMessage(); the values can be translated.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-24-2018 09:51 AM
I have used an undocumented API to achieve this in the past:
g_lang (works in both client and UI Policy scripts)
I have a super detailed presentation on translations if you are interested, but it is focused on custom scoped apps.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-25-2018 09:28 PM
Hi Lon Landry,
Thanks for the reply.
below code working for me :
else if(newValue == "Employee Data Change"){
getMessage('Employee data change', function(msg){
g_form.addOption('u_category_2', msg , msg );
});
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-18-2022 05:53 AM
Hi Poojitha, may I know if you add that message to be translated in the 'sys_ui_message' table with key as 'Employee data change' ? Can you please elaborate on what you did other than this script?