API16

JInstallerTemplate/loadLanguage: Difference between revisions

From Joomla! Documentation

Doxiki (talk | contribs)
New page: ===Description=== Custom loadLanguage method <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<nowiki...
 
m preparing for archive only
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:
Custom loadLanguage method
Custom loadLanguage method


<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[Description:JInstallerTemplate/loadLanguage|Edit Descripton]]<nowiki>]</nowiki>
</span>


{{Description:JInstallerTemplate/loadLanguage}}
 
<! removed transcluded page call, red link never existed >


===Syntax===
===Syntax===
Line 48: Line 46:
</source>
</source>


<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[SeeAlso:JInstallerTemplate/loadLanguage|Edit See Also]]<nowiki>]</nowiki>
<! removed transcluded page call, red link never existed >
</span>
{{SeeAlso:JInstallerTemplate/loadLanguage}}


===Examples===
===Examples===
<CodeExamplesForm />
=== Code Examples ===
<dpl>
<dpl>
  noresultsheader=\n
  noresultsheader=\n
  category=loadLanguage
  category=loadLanguage
  category=JInstallerTemplate
  category=JInstallerTemplate
  category=CodeExample
  namespace=CodeExample
  category=MethodExample
  category=MethodExample
  include=*
  include=*
  format= ,,,
  format= ,,,
</dpl>
</dpl>
[[Category:Archived pages API16]]

Latest revision as of 01:51, 25 March 2017

Description

Custom loadLanguage method


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

Syntax

loadLanguage($path)
Parameter Name Default Value Description
$path $path the path where to find language files

Defined in

libraries/joomla/installer/adapters/template.php

Importing

jimport( 'joomla.installer.adapters.template' );

Source Body

public function loadLanguage($path)
{
        $this->manifest = &$this->parent->getManifest();
        $name = strtolower(JFilterInput::getInstance()->clean((string)$this->manifest->name, 'cmd'));
        $client = (string)$this->manifest->attributes()->client;
        $extension = "tpl_$name";
        $lang =& JFactory::getLanguage();
        $source = $path;
                $lang->load($extension . '.manage', $source, null, false, false)
        ||      $lang->load($extension, $source, null, false, false)
        ||      $lang->load($extension . '.manage', constant('JPATH_'.strtoupper($client)), null, false, false)
        ||      $lang->load($extension, constant('JPATH_'.strtoupper($client)), null, false, false)
        ||      $lang->load($extension . '.manage', $source, $lang->getDefault(), false, false)
        ||      $lang->load($extension, $source, $lang->getDefault(), false, false)
        ||      $lang->load($extension . '.manage', constant('JPATH_'.strtoupper($client)), $lang->getDefault(), false, false)
        ||      $lang->load($extension, constant('JPATH_'.strtoupper($client)), $lang->getDefault(), false, false);
}


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

Examples

Code Examples