How can I get the login language by code?

yan0721
Kilo Explorer

hi teams,

At the login page, i choose a language like 'zh', how can i get this value by codes when i need to check what the exact value of the login language?

Appreciate your feedback.

Sincerely,

Lydia

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

where do you require to get this? Is it server side or client side?

for server side use this

var language = gs.getUser().getLanguage();

for client side; onload, onchange script

var language = g_lang; // for English it would give en

alert(language);

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

6 REPLIES 6

you can try to check in the browser console.

I don't have the list.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

thank you