How to specify user's language in email script

Aishwarya20
Tera Contributor

Hi,

1. whenever we using ${field name} its showing Norwegian language, because its taking system default language that is Norwegian. is there any option to translate the language.
2. How to specify the user's language in email script? because in notification we are using email script and that is also showing system default language.

We created two separate notifications for Norwegian and English by specifying the condition, still its taking systems language whenever we using ${field}.

find_real_file.png

9 REPLIES 9

Hi,

I am confused like how to use different lanuage in email script?

GetMessage will do the translation base don key and message table.

-Anurag

I tried but not working can you tell me how can I use?

this is my script - 

var scReqItem = new GlideRecord("sc_req_item");
scReqItem.addQuery("sys_id", current.sysapproval.toString());
scReqItem.query();
while (scReqItem.next()) {
	var varown = new GlideRecord('sc_item_option_mtom');
	varown.addQuery("request_item", current.sysapproval.toString());
	varown.orderBy("sc_item_option.order");
	varown.query();
	while (varown.next()) {
		var visible = varown.sc_item_option.item_option_new.visible_summary;
		var question = GlideappAbstractChoiceListQuestion.getQuestion(varown.sc_item_option.item_option_new);
		question.setValue(varown.sc_item_option.value);
		if (question.getLabel() != ""  && question.getLabel() != null && question.getDisplayValue() != "" && visible == true && question.getDisplayValue() != undefined ) {
			template.print("\n" + question.getLabel() + " : " + question.getDisplayValue() + "\n");
					
		}
	}
}