I have some code that sets the lang var to the site default language.
$lg = &JFactory::getLanguage();
$lg = explode('-',$lg->_default);
$dlg = $lg[0];
if(!JRequest::getWord('lang', false ))
JRequest::setVar('lang', $dlg );
however before setting it to $dlg I would like to find out if the language is stored in the user information or session.
Can someone tell me how to check the session for language information?
$lg = &JFactory::getLanguage();
$lg = explode('-',$lg->_lang);
$dlg = $lg[0];
if(!JRequest::getWord('lang', false ))
JRequest::setVar('lang', $dlg );
i had to just change it from _default to _lang
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.