示例#1
0
 /**
  * Print language bar.
  *
  * @static
  * @param  boolean $asListItem
  * @access public
  * @return string
  */
 public static function printLanguageBar($asListItem = false)
 {
     global $config, $app;
     $langs = explode(',', $config->site->lang);
     if (count($langs) == 1) {
         return false;
     }
     if ($asListItem) {
         $clientLang = $app->getClientLang();
         echo "<li class='dropdown-header'>{$app->lang->language}</li>";
         foreach ($langs as $lang) {
             $a = html::a(getHomeRoot($config->langsShortcuts[$lang]), $config->langs[$lang]);
             $liClass = $clientLang === $lang ? " class='active'" : '';
             $a = "<li{$liClass}>{$a}</li>";
             echo $a;
         }
     } else {
         foreach ($langs as $lang) {
             echo html::a(getHomeRoot($config->langsShortcuts[$lang]), $config->langAbbrLabels[$lang]);
         }
     }
 }
示例#2
0
    <div class='modal-header'><h3><?php 
    echo $lang->upgrade->fail;
    ?>
</h3></div>
    <div class='modal-body'><?php 
    echo nl2br(join('\\n', $errors));
    ?>
</div>
    <?php 
} else {
    ?>
    <div class='modal-body'><div class='alert alert-success text-center'><h4><?php 
    echo $lang->upgrade->success;
    ?>
</h4></div></div>
    <div class='modal-footer'><?php 
    echo html::a(getHomeRoot(), $lang->home, "class='btn btn-success'");
    ?>
</div>
    <?php 
}
?>
  </div>
</div>
<?php 
if ($this->config->version == '4.2') {
    ?>
<script> $().ready(function(){ $.getJSON(createLink('search', 'buildIndex'), function(){return false;});}); </script>
<?php 
}
include '../../install/view/footer.html.php';
示例#3
0
if (count($langs) > 1) {
    ?>
        <a href='###' class='dropdown-toggle' data-toggle='dropdown'><i class='icon-globe icon-large'></i> &nbsp;<?php 
    echo $langs[$clientLang];
    ?>
<span class='caret'></span></a>
        <ul class='dropdown-menu'>
          <?php 
    unset($langs[$clientLang]);
    ?>
          <?php 
    foreach ($langs as $langKey => $currentLang) {
        ?>
          <li>
            <?php 
        commonModel::printLink('visual', 'index', 'referer=' . getHomeRoot($config->langsShortcuts[$langKey]), $currentLang);
        ?>
          </li>
          <?php 
    }
    ?>
        </ul>
        <?php 
}
?>
      </li>
      <li class="divider"></li>
      <li class='nav-item-primary'>
        <?php 
$mobileTemplate = isset($this->config->site->mobileTemplate) ? $this->config->site->mobileTemplate : 'close';
?>
示例#4
0
 /**
  * Print language bar.
  * 
  * @static
  * @access public
  * @return string
  */
 public static function printLanguageBar()
 {
     global $config, $app;
     $langs = explode(',', $config->site->lang);
     if (count($langs) == 1) {
         return false;
     }
     foreach ($langs as $lang) {
         echo html::a(getHomeRoot($config->langsShortcuts[$lang]), $config->langs[$lang]);
     }
 }
示例#5
0
 /**
  * Set lang code.
  * 
  * @access public
  * @return void
  */
 public function fixLangConfig()
 {
     $langCode = $this->clientLang == $this->config->default->lang ? '' : $this->config->langsShortcuts[$this->clientLang];
     $this->config->langCode = $langCode;
     $this->config->homeRoot = getHomeRoot();
 }