Get language ID in ewcontroller?

Hi,

My project requires of me to get the language on server side, specifically in ewcontroller - I am using v2019 - and I cannot access it…I tried the following:
Session[Config.SessionLanguageId] returns null,
CurrentLanguage returns null,
CurrentLanguageID returns null,
Language.LanguageID also returns null,
some of these return object reference error

I am assigning it to a string so:
string langid = … - as shown in the documentation
How can I access current language in use?

Kind regards,
Alex

Try creating the language object first, for example:

Language ??= new Lang();

Thank You, this worked, I don’t know why I haven’t tried it in the first place O.O
Thanks for the help! :slight_smile: