0

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?

1 Answer 1

1
$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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.