$language = JFactory::getLanguage(); $languageCode = $language->get('tag'); $languageTitle = $language->get('title'); echo "Current Language is ".$languageCode." (".$languageTitle.")";
$language = JFactory::getLanguage(); $languageImage = $language->get('image'); echo '';This code will output the language flag image associated with the current language. The JFactory getLanguage function is part of the Joomla! Platform library.