What is the method to get the user language? Is there any easy way like; Am_Lite::getInstance()->getUserLANG()
Hey Alex, Thanks for the reply. I can pull the user info but lang is empty. I have set 3 languages and language selection works on the amember member area but when I use the above method I gives empty nothing. I also get the below error on some occasions. So there might be some issue somewhere. A PHP Error was encountered Severity: Notice Message: Undefined index: lang Filename: Am/Lite.php Line Number: 96
What is line 96 of your amember/library/Am/Lite.php file? Look at aMember database - "am_user" table. Is the field "lang" filled-in?
Some of the users have language but some do not have anything (NULL) in that field. Default language is English so if their language is English they dont make any language selection and this creates the error. I guess if user makes a selection than that table field is filled otherwise it is not. But my question is related to language selection. When a user choose the language or not choose the language, how can I detect the current language. Your solution works only if the user makes any selection. If they don't make the selection it gives the above error.