| API | Package | Subpackage | Class | Method | Reference | Last reviewed | Doc status |
|---|---|---|---|---|---|---|---|
Home |
Joomla.Framework |
Document |
JDocument |
getLang |
getLang() |
Never | Work in Progress |
Gets the language of the current document.
string getLang ()
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