$currentArticle = JFactory::getApplication()->getParams()->get('article'); $languageId = $currentArticle->getLanguageId(); echo "Language ID: " . $languageId;
$articleId = 123; $article = JTable::getInstance('content'); $article->load($articleId); $languageId = $article->getLanguageId(); echo "Language ID: " . $languageId;This code loads a specific article using its ID and uses the getLanguageId method to retrieve its language ID. Package Library: Joomla CMS.