本文整理匯總了PHP中Translation::setLanguage方法的典型用法代碼示例。如果您正苦於以下問題:PHP Translation::setLanguage方法的具體用法?PHP Translation::setLanguage怎麽用?PHP Translation::setLanguage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Translation
的用法示例。
在下文中一共展示了Translation::setLanguage方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: ini_set
* mobbo 6.0 - Habbo Environment
* start the habbo environment
*
*/
// mysql connect
Transaction::open(array('user' => $host_user, 'pass' => $host_pass, 'name' => $host_db, 'type' => $host_type, 'port' => $host_port, 'host' => $host));
$conn = Transaction::get();
// check the debug mode
if ($debug_mode) {
ini_set("display_errors", false);
ini_set('default_charset', 'iso-8859-1');
header("Content-Type: text/html; charset=ISO-8859-1", true);
error_reporting(1);
}
// start the translation system
Translation::setLanguage($language);
Security::ddosprotect();
// the hotel settings rows
$remote_ip = $_SERVER['REMOTE_ADDR'];
$maintenance = mobbo::mobbo_settings('maintenance') != 0 ? mobbo::mobbo_settings('maintenace') : 0;
// check the settings rows for the housekeeping
// Transaction::query ( "UPDATE mobbo_settings SET value = 'mobbo-c9-sant0ro.c9.io' WHERE variable = 'hotel_url'" ) ;
$config = Transaction::fetch($mobbo_settings);
$sitename = mobbo::mobbo_settings('hotel_name');
$path = mobbo::mobbo_settings('hotel_url');
$onlines = $online_count;
$shortname = $mobbo_name;
$adminpath = $path . "/acp/";
$pagefile = $_SERVER['PHP_SELF'];
$key = htmlentities($_GET['key']);
// check the date and start the dating rows
示例2: doAddTranslation
/**
* @param Translation $translation The translation object to add.
*/
protected function doAddTranslation($translation)
{
$this->collTranslations[] = $translation;
$translation->setLanguage($this);
}