Translate String in an UI Policy with addDecoration

Dario_C
Mega Sage

"Hello everyone, I need to translate the string inside this g_form.addDecoration to another language. How can I do that? Using sys_translated and sys_translated_text doesn't seem to work. Any ideas?"

 

Below my Script

 

function onCondition() {
g_form.addDecoration("u_asset_is_requested_for_return" , "icon-mail", "Waiting for confirmation for the return from the user", "color-yellow");

}

 

Thanks in advance

4 REPLIES 4

Anurag Tripathi
Mega Patron
Mega Patron

HI,

You need to use message table. -> Message table (servicenow.com)

 

You can store the messages in different languages and you have to fetch the message using the key. It will display based on user's language.

-Anurag

Hi Anurag,

thanks for your Reply. 

With ShowfieldMessage the translation work fine, but with the string inside the addDecoration, doesnt work. Maybe we can't translate the message on hoover on icon ? 

have you tried translating the message first and then pass to the add decoration function

-Anurag

Yes, but doesn't work. I think isn't possibile to translate a string inside the g_formAddDecoration. So i have cancelled that, thank for your support.