本文整理汇总了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);
}