当前位置: 首页>>代码示例>>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;未经允许,请勿转载。