本文整理匯總了PHP中PMA_langList函數的典型用法代碼示例。如果您正苦於以下問題:PHP PMA_langList函數的具體用法?PHP PMA_langList怎麽用?PHP PMA_langList使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了PMA_langList函數的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testLangListWithWrongDir
function testLangListWithWrongDir()
{
$GLOBALS['lang_path'] = '/root/';
$expected = array('en' => PMA_langDetails('en'));
$this->assertEquals($expected, PMA_langList());
}
示例2: PMA_langList
/**
* @global boolean whether loading lang from cookie failed
*/
$GLOBALS['lang_failed_cookie'] = false;
/**
* @global boolean whether 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'])) {
$new_lang = array();
foreach ($GLOBALS['available_languages'] as $key => $val) {
if (preg_match('@' . $GLOBALS['cfg']['FilterLanguages'] . '@', $key)) {
$new_lang[$key] = $val;
}
}
if (count($new_lang) > 0) {
$GLOBALS['available_languages'] = $new_lang;
}
unset($key, $val, $new_lang);
}
/**
* @global array MySQL charsets map