How to translate confirm message from client script?

antony4007
Tera Expert

Hi Experts,

We have a requirement to translate a confirm message from client script.

confirm("You confirm that all information being submitted is accurate. If you are unsure select Cancel to return to editing, otherwise select OK.")

I tried below way and its not working

getMessage(("update personal information message", function(msg){
confirm(msg);}

Any one come across this translation? Please suggest.

 

Thanks,

Antony

1 ACCEPTED SOLUTION

Below setup for example, results correctly in Dutch in "Hallo", instead of English "Hello".

find_real_file.png

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

View solution in original post

11 REPLIES 11

Elijah Aromola
Mega Sage

You can store the result in a variable if that is what you need to do. Something like this:

var answer = confirm("You confirm all informatino being submitted is accurate...")
if(answer == true) {
 // answer is true
} else {
 // answer is false
}

Mark Roethof
Tera Patron
Tera Patron

Hi there,

Can you share your full script?

Using something like:

g_form.addInfoMessage(getMessage("Your message"));

Should work fine. Do be aware, use the message field on the Client Script form lay-out also, and paste the key of your message in there.

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Mark Roethof
Tera Patron
Tera Patron

Also just verified with using confirm. Works fine.

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Hi Mark,

 

Thanks for the response. I tried as below and its not working.

g_form.confirm(getMessage("update personal information message"));