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


PHP Locale::start方法代碼示例

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


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

示例1: prepareConfigForm

 function prepareConfigForm()
 {
     $view = $this->tpl();
     /* We load the user configuration */
     $this->user->reload();
     $l = Locale::start();
     $view->assign('languages', $l->getList());
     $view->assign('me', $this->user->getLogin());
     $view->assign('conf', $this->user->getConfig());
     $view->assign('submit', $this->call('ajaxSubmit', "movim_parse_form('general')") . "this.className='button color orange inactive oppose';\n                    this.onclick=null;");
     return $view->draw('_config_form', true);
 }
開發者ID:sugaryog,項目名稱:movim,代碼行數:12,代碼來源:Config.php

示例2: reload

 /**
  * @brief Reload the user configuration
  */
 function reload()
 {
     $session = \Sessionx::start();
     if ($session->config) {
         $this->config = $session->config;
         $lang = $this->getConfig('language');
         if (isset($lang)) {
             $l = Locale::start();
             $l->load($lang);
         }
         $cd = new modl\CapsDAO();
         $caps = $cd->get($session->host);
         $this->caps = unserialize($caps->features);
     }
 }
開發者ID:sugaryog,項目名稱:movim,代碼行數:18,代碼來源:User.php

示例3: display

 function display()
 {
     $cd = new \Modl\ConfigDAO();
     $config = $cd->get();
     $l = Locale::start();
     $this->view->assign('conf', $cd->get());
     $this->view->assign('logs', array(0 => $this->__('log.empty'), 1 => $this->__('log.syslog'), 2 => $this->__('log.syslog_files')));
     $this->view->assign('bosh_info4', $this->__('bosh.info4', '<a href="http://wiki.movim.eu/en:install">', '</a>'));
     $json = requestURL(MOVIM_API . 'websockets', 1);
     $json = json_decode($json);
     if (isset($json) && $json->status != 404) {
         $this->view->assign('websockets', $json);
     }
     $this->view->assign('server_rewrite', false);
     if (isset($_SERVER['HTTP_MOD_REWRITE']) && $_SERVER['HTTP_MOD_REWRITE']) {
         $this->view->assign('server_rewrite', true);
     }
     $this->view->assign('timezones', getTimezoneList());
     $this->view->assign('langs', $l->getList());
 }
開發者ID:sugaryog,項目名稱:movim,代碼行數:20,代碼來源:AdminMain.php

示例4: loadLanguage

 /**
  * Loads up the language, either from the User or default.
  */
 function loadLanguage()
 {
     $user = new User();
     $user->reload();
     $cd = new \Modl\ConfigDAO();
     $config = $cd->get();
     $l = Locale::start();
     if ($user->isLogged()) {
         $lang = $user->getConfig('language');
         if (isset($lang)) {
             $l->load($lang);
         } else {
             // Load default language.
             $l->load($config->locale);
         }
     } elseif (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
         $l->detect();
         $l->loadPo();
     } else {
         $l->load($config->locale);
     }
 }
開發者ID:sugaryog,項目名稱:movim,代碼行數:25,代碼來源:bootstrap.php

示例5: __

function __()
{
    $args = func_get_args();
    $l = Locale::start();
    $string = array_shift($args);
    return $l->translate($string, $args);
}
開發者ID:vincentux,項目名稱:movim_ynh,代碼行數:7,代碼來源:Locale.php


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