- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2023 09:08 AM
I want to check Logged in user language in Server side. I wrote the below script but it is not working
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2023 09:18 AM
Hi @Kri
gs.getSession().getLanguage() is correct and will give you the language opted by Logged in user
The issue here is you are trying to match it to English which is incorrect. The reason being servicenow stores language preference in terms of language code.
So for English, language code is en
Similarly you can find the code for other languages in below link
http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2023 09:18 AM
Hi @Kri
gs.getSession().getLanguage() is correct and will give you the language opted by Logged in user
The issue here is you are trying to match it to English which is incorrect. The reason being servicenow stores language preference in terms of language code.
So for English, language code is en
Similarly you can find the code for other languages in below link
http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2023 09:24 AM
Perfect! thanks