Get current session language for users not log-in

epinetti
Tera Guru

HI Everyone,

I am working with an Istambul instance with 3 languages.

I need to be able to send notifications for registration and recover password in different languages according to the current picked language by the user.

I am writing the condition into the Notification to select the correct language but the user is not log-in yet into the system, so I can't use gs.getSession().getLanguage();

I was doing some debugging and I see there are these 2 parameters on the client side

var g_lang = 'fq';   //French Canadien

var g_system_lang = 'en';

how could I send these values to the server?

Any other idea how I can resolve that?

Thanks

4 REPLIES 4

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hello Eduardo,



You can GlideRecord the user table and fetch the language field based on the user field value.


Let me know if you have any questions.


Hi Pradeep and thank for your response



As I explained, the user is not login yet into the system so, I can not "GlideRecord the user table".


I just have some client side variables to play but I dont know how



Thanks


Hi Eduardo,



There is language field available for email notifications. Replicate the same notification for all three languages and it system will send the appropriate notification to the recipients based on the Language in there user profile.  


HI Gurpreet



Yes.. there is the "preferred_language" label "Langauge"....but as you said this value is base on user profile.. and In my case the user is not login at the moment that these notifications are sent, So I cant use that option either. The default value is EN