API16

JLanguage/setLanguage: Difference between revisions

From Joomla! Documentation

m clean up
m preparing for archive only
 
Line 44: Line 44:


===Examples===
===Examples===
<CodeExamplesForm />
=== Code Examples ===
<dpl>
<dpl>
  noresultsheader=\n
  noresultsheader=\n
  category=setLanguage
  category=setLanguage
  category=JLanguage
  category=JLanguage
  category=CodeExample
  namespace=CodeExample
  category=MethodExample
  category=MethodExample
  include=*
  include=*

Latest revision as of 01:52, 25 March 2017

Description

Set the language attributes to the given language


<! removed transcluded page call, red link never existed >

Syntax

setLanguage($lang)
Parameter Name Default Value Description
$lang $lang Language code

Returns

string Previous value

Defined in

libraries/joomla/language/language.php

Importing

jimport( 'joomla.language.language' );

Source Body

public function setLanguage($lang)
{
        $previous                       = $this->_lang;
        $this->_lang            = $lang;
        $this->_metadata        = $this->getMetadata($this->_lang);

        return $previous;
}


<! removed transcluded page call, red link never existed >

Examples

Code Examples