- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2020 03:01 AM
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
Solved! Go to Solution.
- Labels:
-
Managed Documents
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2020 03:12 AM
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
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2020 03:12 AM
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
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2022 05:30 PM
var language = g_lang;
Hi there,
about the variable g_lang,
is that a global variable in client script?
i think there are more global variables in client script, so is there any document about all of them?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2022 08:23 PM
No documentation available as such.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2022 08:33 PM
thanks for answering.
would you mind to share with me the global variables you know as many as you can?