Detecting the current language the front-end is in - what API do you use? - Community forums - Akumina Community

Community forums

Forum Navigation
You need to log in to create posts and topics.

Detecting the current language the front-end is in - what API do you use?

NOTE: from https://github.com/akumina/AkuminaTraining/wiki/Multilingual:-Akumina-Framework-language-awareness#usercontext-properties

 

The UserContext object has several properties related to multilingual, to assist a developer in determining the language of the user.

Property Description
FallbackLanguageId The id code for the fallback language of the user.
LanguageCode The ll-cc code for the language of the user
LanguageId The id code for the language of the user

These properties can be accessed via the following calls:

Akumina.Digispace.UserContext.FallbackLanguageId
"1033"

Akumina.Digispace.UserContext.LanguageCode
"es-es"

Akumina.Digispace.UserContext.LanguageId
1034
//]]>