当前位置: 首页>>代码示例>>PHP>>正文


PHP Internationalization::availableLanguages方法代码示例

本文整理汇总了PHP中Internationalization::availableLanguages方法的典型用法代码示例。如果您正苦于以下问题:PHP Internationalization::availableLanguages方法的具体用法?PHP Internationalization::availableLanguages怎么用?PHP Internationalization::availableLanguages使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Internationalization的用法示例。


在下文中一共展示了Internationalization::availableLanguages方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: client

 function client()
 {
     global $cfg;
     $lang = Internationalization::getCurrentLanguage();
     list($sl, $locale) = explode('_', $lang);
     $rtl = false;
     foreach (Internationalization::availableLanguages() as $info) {
         if (isset($info['direction'])) {
             $rtl = true;
         }
     }
     $config = array('html_thread' => (bool) $cfg->isHtmlThreadEnabled(), 'lang' => $lang, 'short_lang' => $sl, 'has_rtl' => $rtl);
     $config = $this->json_encode($config);
     Http::cacheable(md5($config), $cfg->lastModified());
     header('Content-Type: application/json; charset=UTF-8');
     return $config;
 }
开发者ID:gizur,项目名称:osticket,代码行数:17,代码来源:ajax.config.php

示例2: __

        ?>
                    <a href="<?php 
        echo $signin_url;
        ?>
"><?php 
        echo __('Sign In');
        ?>
</a>
<?php 
    }
}
?>
            </p>
            <p>
<?php 
if (($all_langs = Internationalization::availableLanguages()) && count($all_langs) > 1) {
    foreach ($all_langs as $code => $info) {
        list($lang, $locale) = explode('_', $code);
        ?>
        <a class="flag flag-<?php 
        echo strtolower($locale ?: $info['flag'] ?: $lang);
        ?>
"
            href="?<?php 
        echo urlencode($_GET['QUERY_STRING']);
        ?>
&amp;lang=<?php 
        echo $code;
        ?>
" title="<?php 
        echo Internationalization::getLanguageDescription($code);
开发者ID:gizur,项目名称:osticket,代码行数:31,代码来源:header.inc.php

示例3: __

                        }
                    }
                    ?>
                </select>
                &nbsp;<span class="error">*&nbsp;<?php echo $errors['tpl_id']; ?></span><i class="help-tip icon-question-sign" href="#template_to_clone"></i>
            </td>
        </tr>
</tbody>
<tbody id="language">
        <tr>
            <td width="180" class="required">
                <?php echo __('Language'); ?>:
            </td>
            <td>
        <?php
        $langs = Internationalization::availableLanguages(); ?>
                <select name="lang_id">
<?php foreach($langs as $l) {
    $selected = ($info['lang_id'] == $l['code']) ? 'selected="selected"' : ''; ?>
                    <option value="<?php echo $l['code']; ?>" <?php echo $selected;
                        ?>><?php echo Internationalization::getLanguageDescription($l['code']); ?></option>
<?php } ?>
                </select>
                &nbsp;<span class="error">*&nbsp;<?php echo $errors['lang_id']; ?></span>
                <i class="help-tip icon-question-sign" href="#language"></i>
            </td>
        </tr>
</tbody>
<tbody>
        <?php } ?>
        <tr>
开发者ID:KingsleyGU,项目名称:osticket,代码行数:31,代码来源:template.inc.php

示例4: db_result

            FROM information_schema.TABLES WHERE table_schema = '
            .db_input(DBNAME);
        $space = db_result(db_query($sql));
        echo sprintf('%.2f MiB', $space); ?></td>
    <tr><td><?php echo __('Space for Attachments'); ?></td>
        <td><?php
        $sql = 'SELECT SUM(LENGTH(filedata)) / 1048576 FROM '.FILE_CHUNK_TABLE;
        $space = db_result(db_query($sql));
        echo sprintf('%.2f MiB', $space); ?></td>
</tbody>
</table>
<br/>
<h2><?php echo __('Installed Language Packs'); ?></h2>
<div style="margin: 0 20px">
<?php
    foreach (Internationalization::availableLanguages() as $info) {
        $p = $info['path'];
        if ($info['phar']) $p = 'phar://' . $p;
        if (file_exists($p . '/MANIFEST.php')) {
            $manifest = (include $p . '/MANIFEST.php'); ?>
    <h3><strong><?php echo Internationalization::getLanguageDescription($info['code']); ?></strong>
        &mdash; <?php echo $manifest['Language']; ?>
<?php       if ($info['phar'])
                Plugin::showVerificationBadge($info['path']);
            ?>
        </h3>
        <div><?php echo __('Version'); ?>: <?php echo $manifest['Version']; ?>,
            <?php echo __('Built'); ?>: <?php echo $manifest['Build-Date']; ?>
        </div>
<?php }
    } ?>
开发者ID:CarlosAvilesMx,项目名称:CarlosAviles.Mx,代码行数:31,代码来源:system.inc.php

示例5: foreach

        <div id="header">
            <img id="logo" src="./images/<?php echo $wizard['logo']?$wizard['logo']:'logo.png'; ?>" width="280" height="72" alt="osTicket">
            <div class="info"><?php echo $wizard['tagline']; ?></div>
            <br/>
            <ul class="links">
                <li>
                   <?php
                   foreach($wizard['menu'] as $k=>$v)
                    echo sprintf('<a target="_blank" href="%s">%s</a> &mdash; ',$v,$k);
                   ?>
                    <a target="_blank" href="http://osticket.com/contact-us"><?php echo __('Contact Us');?></a>
                </li>
            </ul>
            <div class="flags">
<?php
if (($all_langs = Internationalization::availableLanguages())
    && (count($all_langs) > 1)
) {
    foreach ($all_langs as $code=>$info) {
        list($lang, $locale) = explode('_', $code);
?>
        <a class="flag flag-<?php echo strtolower($locale ?: $info['flag'] ?: $lang); ?>"
            href="?<?php echo urlencode($_GET['QUERY_STRING']); ?>&amp;lang=<?php echo $code;
            ?>" title="<?php echo Internationalization::getLanguageDescription($code); ?>">&nbsp;</a>
<?php }
} ?>
            </div>
        </div>
        <div class="clear"></div>
        <div id="content">
开发者ID:pombredanne,项目名称:ArcherSys,代码行数:30,代码来源:header.inc.php


注:本文中的Internationalization::availableLanguages方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。