Difference between revisions of "JFactory/getLanguage"
From Joomla! Documentation
< API16:JFactory
(New page: ===Description===
Get a language object
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki>
</s...) |
m (preparing for archive only) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
Get a language object | Get a language object | ||
− | |||
− | |||
− | |||
− | + | ||
+ | <! removed transcluded page call, red link never existed > | ||
===Syntax=== | ===Syntax=== | ||
Line 38: | Line 36: | ||
</source> | </source> | ||
− | + | ||
− | + | <! removed transcluded page call, red link never existed > | |
− | < | ||
− | |||
===Examples=== | ===Examples=== | ||
− | + | === Code Examples === | |
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=getLanguage | category=getLanguage | ||
category=JFactory | category=JFactory | ||
− | + | namespace=CodeExample | |
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
+ | [[Category:Archived pages API16]] |
Latest revision as of 20:39, 24 March 2017
The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
Description[edit]
Get a language object
<! removed transcluded page call, red link never existed >
Syntax[edit]
static getLanguage()
Returns[edit]
object
Defined in[edit]
libraries/joomla/factory.php
Importing[edit]
jimport( 'joomla.factory' );
Source Body[edit]
public static function getLanguage()
{
if (!is_object(JFactory::$language))
{
//get the debug configuration setting
$conf = &JFactory::getConfig();
$debug = $conf->getValue('config.debug_lang');
JFactory::$language = JFactory::_createLanguage();
JFactory::$language->setDebug($debug);
}
return JFactory::$language;
}
<! removed transcluded page call, red link never existed >
Examples[edit]
Code Examples[edit]