$langtag = JFactory::getLanguage()->getTag();$parts = explode('-', $langtag);$curlang = strtolower($parts[0]);