Professional Documents
Culture Documents
Jo Code PHP
Jo Code PHP
<?php
/**
* @package Joomla.Installation
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('JPATH_BASE') or die;
JFormHelper::loadFieldClass('list');
/**
* Installation Language field.
*
* @since 1.6
*/
class InstallationFormFieldLanguage extends JFormFieldList
{
/**
* The form field type.
*
* @var string
* @since 1.6
*/
protected $type = 'Language';
/**
* Method to get the field options.
*
* @return array The field option objects.
*
* @since 1.6
*/
protected function getOptions()
{
$app = JFactory::getApplication();
if (empty($native))
{
$native = 'en-GB';
}
if (!empty($forced['language']))
{
$native = $forced['language'];
}
-1-
C:\Users\Ionut\AppData\Local\Temp\Rar$DIa7036.18818\language.php marți, 13 septembrie 2022 18:14
if (isset($options['language']))
{
$native = $options['language'];
}
return $options;
}
/**
* 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 string
*
* @since 3.1
*/
protected function _sortLanguages($a, $b)
{
return strcmp($a['text'], $b['text']);
}
}
-2-