本文整理汇总了PHP中PMA_langDetails函数的典型用法代码示例。如果您正苦于以下问题:PHP PMA_langDetails函数的具体用法?PHP PMA_langDetails怎么用?PHP PMA_langDetails使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PMA_langDetails函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testLangListWithWrongDir
function testLangListWithWrongDir()
{
$GLOBALS['lang_path'] = '/root/';
$expected = array('en' => PMA_langDetails('en'));
$this->assertEquals($expected, PMA_langList());
}
示例2: PMA_langList
/**
* Returns list of languages supported by phpMyAdmin
*
* @return array
*/
function PMA_langList()
{
/* We can always speak English */
$result = array('en' => PMA_langDetails('en'));
/* Check for existing directory */
if (!is_dir($GLOBALS['lang_path'])) {
return $result;
}
/* Open the directory */
$handle = @opendir($GLOBALS['lang_path']);
/* This can happen if the kit is English-only */
if ($handle === false) {
return $result;
}
/* Process all files */
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != ".." && file_exists($GLOBALS['lang_path'] . '/' . $file . '/LC_MESSAGES/phpmyadmin.mo')) {
$result[$file] = PMA_langDetails($file);
}
}
/* Close the handle */
closedir($handle);
return $result;
}
示例3: testLangDetails
/**
* @dataProvider dataProvider
*/
function testLangDetails($a, $b, $c,$d)
{
$this->assertEquals(array($a, $b, $c), PMA_langDetails($d));
}