Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to change buttons on the language setting in ServiceNow.

CAO
Tera Contributor

I have two identical buttons, one in English and one in Japanese. I want these buttons to change based on the language setting in ServiceNow. For example, if the language is set to English, I want to display the English version of the button, and if the language is set to Japanese, I want to display the Japanese version. How can I achieve this?

1 ACCEPTED SOLUTION

Harshal Aditya
Mega Sage

Hi @CAO ,

 

Could you try below line in condition of UI action ?

 

For English

gs.getSession().getLanguage() == "en"

 

For Japanese

gs.getSession().getLanguage() == "ja"

 

Please mark this response as correct or helpful if it assisted you with your question.

Regards,
Harshal

View solution in original post

3 REPLIES 3

Harshal Aditya
Mega Sage

Hi @CAO ,

 

Could you try below line in condition of UI action ?

 

For English

gs.getSession().getLanguage() == "en"

 

For Japanese

gs.getSession().getLanguage() == "ja"

 

Please mark this response as correct or helpful if it assisted you with your question.

Regards,
Harshal

Thank you very much!

 

Ravi Chandra_K
Kilo Patron
Kilo Patron

Hello @CAO 

If you are in scoped application, use Harshal's script in script include in Global.

Help others to find a correct solution by marking the appropriate response as correct answer and helpful!!

 

Kind Regards,

Ravi Chandra.