Source for file language.php
Documentation is available at language.php
* @package Joomla.Installation
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* Language Form Field class.
* @package Joomla.Installation
protected $type =
'Language';
* Method to get the field options.
* @return array The field option objects.
// Detect the native language.
// Get a forced language if it exists.
$forced =
$app->getLocalise();
if (!empty($forced['language']))
$native =
$forced['language'];
// If a language is already set in the session, use this instead
$options =
$model->getOptions();
if (isset
($options['language']))
$native =
$options['language'];
// Get the list of available languages.
if (!$options ||
$options instanceof
Exception)
// Sort languages by name
usort($options, array($this, '_sortLanguages'));
// Set the default value from the native language.
// Merge any additional options in the XML definition.
* Method to sort languages by name.
* @param string $a The first value to determine sort
* @param string $b The second value to determine sort
return strcmp($a['text'], $b['text']);
Documentation generated on Tue, 19 Nov 2013 15:06:26 +0100 by phpDocumentor 1.4.3