當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CLang::translate方法代碼示例

本文整理匯總了PHP中CLang::translate方法的典型用法代碼示例。如果您正苦於以下問題:PHP CLang::translate方法的具體用法?PHP CLang::translate怎麽用?PHP CLang::translate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CLang的用法示例。


在下文中一共展示了CLang::translate方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: define

 $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);
 $queries = ereg_replace('%show_index_in_user_nav%', No, $queries);
開發者ID:BackupTheBerlios,項目名稱:yapcas-svn,代碼行數:31,代碼來源:install.php


注:本文中的CLang::translate方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。