Table of Contents

getLang

API Package Subpackage Class Method Reference Last reviewed Doc status
API Home Package Joomla.Framework Subpackage Document Class JDocument Method getLang Reference getLang() Never Work in Progress

Gets the language of the current document.

Syntax

string getLang ()

Examples

This example displays the language code for the current document.

Example

global $mainframe;

$document = &JFactory::getDocument();
echo "Language: " . $document->getLang();

Might produce:

Result

Language: en