I want to get translated text in email script

chanken
Tera Contributor

Hi everyone,

I want to get translated text in email script.

Do I need to obtain translated text from sys_translated using GlideRecord?

Is there any other way?

regards.

7 REPLIES 7

chanken
Tera Contributor

Hi Rusty,



Is it a correct way to hold two translations for field labels and scripts?


I am concerned about amendment and manpower due to being in two places.


Hi,



Both are OOB functionality.


System Localization> Translated Text is totally different concept from System UI> Messages.



I need to know what you mean "Is it register translations"???




"gs.getMessage()" is enough to translate text using script. This is OOB functionality of servicenow.



gs.getMessage() translate text in application side as well as service portal side too.



This is just pick data form message table - Please don't think too much like google translation.



Think just message table is the data center of all the label in different language, you just pick the one data using the key value


"gs.getMessage(<<key_value>>)"; language is automatically choose from current logged_in user.



Regards,


Kishor


Uttam Sai
Tera Contributor

Hi @Kishor kumar1 @chanken @ruzzty06 ,

Could you please help me how to use "gs.getMessage()" for the below part of email script.

template.print('<div>Hello ${task.assigned_to.name},</div><div>&nbsp;</div><div>This is a friendly reminder that your task "${task.u_activity_type}" on ${task.parent.number} still requires your action. Please take the required actions, then complete this task as soon as possible in the ServiceNow portal.</div><div>&nbsp;</div><div>You can access your onboarding case from the link below to complete your task.</div>');
}
I have posted a new question here