本文整理汇总了PHP中CLang::getPrefLangCode方法的典型用法代码示例。如果您正苦于以下问题:PHP CLang::getPrefLangCode方法的具体用法?PHP CLang::getPrefLangCode怎么用?PHP CLang::getPrefLangCode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CLang
的用法示例。
在下文中一共展示了CLang::getPrefLangCode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: define
$d = $database->load($_POST['databasetype']);
$d->connect($_POST['databasehost'], $_POST['databaseuser'], $_POST['databasepassword'], $_POST['databasename']);
define('TBL_PREFIX', $_POST['databaseprefix']);
$queries = file_get_contents('kernel/sql/users.sql');
$queries .= file_get_contents('kernel/sql/news.sql');
$queries .= file_get_contents('kernel/sql/polls.sql');
$queries .= file_get_contents('kernel/sql/basic.sql');
$queries .= file_get_contents('kernel/sql/help.sql');
// TODO
include_once 'kernel/language.class.php';
$languages = new CLang();
foreach ($languages->installed() as $language) {
echo $language;
$languages->update($language);
$tmpquery = file_get_contents('kernel/sql/basicpages.sql');
$tmpquery = ereg_replace('%language%', $languages->getPrefLangCode(), $tmpquery);
$tmpquery = ereg_replace('%shown_logout%', $languages->translate('logout'), $tmpquery);
$tmpquery = ereg_replace('%shown_index%', $languages->translate('Home'), $tmpquery);
$tmpquery = ereg_replace('%shown_registerform%', $languages->translate('Register'), $tmpquery);
$tmpquery = ereg_replace('%shown_sendpasswordform%', $languages->translate('Lost Password'), $tmpquery);
$tmpquery = ereg_replace('%shown_changeoptionsform%', $languages->translate('Edit Settings'), $tmpquery);
$tmpquery = ereg_replace('%shown_viewuserlist%', $languages->translate('Userlist'), $tmpquery);
$queries .= $tmpquery;
}
$queries = ereg_replace('%show_logout_in_nav%', Yes, $queries);
$queries = ereg_replace('%show_index_in_nav%', Yes, $queries);
$queries = ereg_replace('%show_registerform_in_nav%', No, $queries);
$queries = ereg_replace('%show_sendpasswordform_in_nav%', No, $queries);
$queries = ereg_replace('%show_changeoptionsform_in_nav%', Yes, $queries);
$queries = ereg_replace('%show_viewuserlist_in_nav%', Yes, $queries);
$queries = ereg_replace('%show_logout_in_user_nav%', Yes, $queries);