From Piotr, a GSOC student for us, who needs a way to get unfiltered language list

This commit is contained in:
Marc Delisle
2008-07-01 18:42:41 +00:00
parent 710cb32521
commit 4eabff1312

View File

@@ -156,32 +156,13 @@ function PMA_langDetect(&$str, $envType)
} // end of the 'PMA_langDetect()' function
/**
* @global string path to the translations directory
* Returns list of languages supported by phpMyAdmin
*
* @return array
*/
$GLOBALS['lang_path'] = './lang/';
/**
* @global string interface language
*/
$GLOBALS['lang'] = 'en-utf-8';
/**
* @global boolean wether loading lang from cfg failed
*/
$GLOBALS['lang_failed_cfg'] = false;
/**
* @global boolean wether loading lang from cookie failed
*/
$GLOBALS['lang_failed_cookie'] = false;
/**
* @global boolean wether loading lang from user request failed
*/
$GLOBALS['lang_failed_request'] = false;
/**
* @global string text direction ltr or rtl
*/
$GLOBALS['text_dir'] = 'ltr';
/**
function PMA_langList()
{
/**
* All the supported languages have to be listed in the array below.
* 1. The key must be the "official" ISO 639 language code and, if required,
* the dialect code. It can also contain some informations about the
@@ -208,10 +189,7 @@ $GLOBALS['text_dir'] = 'ltr';
* example.
*
*/
/**
* @global array supported languages
*/
$GLOBALS['available_languages'] = array(
return array(
'af-utf-8' => array('af|afrikaans', 'afrikaans-utf-8', 'af', ''),
'ar-utf-8' => array('ar|arabic', 'arabic-utf-8', 'ar', 'العربية'),
'az-utf-8' => array('az|azerbaijani', 'azerbaijani-utf-8', 'az', 'Azərbaycanca'),
@@ -267,7 +245,39 @@ $GLOBALS['available_languages'] = array(
'uk-utf-8' => array('uk|ukrainian', 'ukrainian-utf-8', 'uk', 'Українська'),
'zhtw-utf-8' => array('zh[-_](tw|hk)|chinese traditional', 'chinese_traditional-utf-8', 'zh-TW', '中文'),
'zh-utf-8' => array('zh|chinese simplified', 'chinese_simplified-utf-8', 'zh', '中文'),
);
);
}
/**
* @global string path to the translations directory
*/
$GLOBALS['lang_path'] = './lang/';
/**
* @global string interface language
*/
$GLOBALS['lang'] = 'en-utf-8';
/**
* @global boolean wether loading lang from cfg failed
*/
$GLOBALS['lang_failed_cfg'] = false;
/**
* @global boolean wether loading lang from cookie failed
*/
$GLOBALS['lang_failed_cookie'] = false;
/**
* @global boolean wether loading lang from user request failed
*/
$GLOBALS['lang_failed_request'] = false;
/**
* @global string text direction ltr or rtl
*/
$GLOBALS['text_dir'] = 'ltr';
/**
* @global array supported languages
*/
$GLOBALS['available_languages'] = PMA_langList();
// Language filtering support
if (! empty($GLOBALS['cfg']['FilterLanguages'])) {