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


PHP app::lang方法代码示例

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


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

示例1:

<h3><?php 
echo app::lang('step6_title');
?>
</h3>

<p style="text-align:center">
    <?php 
echo app::lang('step6_txt1');
?>
<br><br>
    <a href="/index.php"><?php 
echo app::lang('step6_txt2');
?>
</a>
</p>
开发者ID:ValenokPC,项目名称:tabernacms,代码行数:15,代码来源:step6.php

示例2:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
<title><?php 
echo app::lang('title');
?>
</title>
<link rel="stylesheet" href="/install/style.css" type="text/css">
<script src="/libc/jquery/jquery.js" type="text/javascript"></script>
</head>
<body>
    <div id="page">
        <div id="header">
            <img src="/image.php?m=core&p=original&f=des/logo.jpg">
            <div id="page_title"><?php 
echo app::lang('title');
?>
</div>
        </div>
        <div id="content">
            <?php 
echo app::getVar('content');
?>
        </div>
    </div>
</body>
</html>
开发者ID:ValenokPC,项目名称:tabernacms,代码行数:29,代码来源:_layout.php

示例3: foreach

    <?php 
foreach ($f as $key => $arr) {
    echo '<div ' . ($arr['error'] ? 'class="no"' : '') . '
            <td>' . $arr[$arr['error'] ? 'error' : 'label'] . (($arr['download'] and $arr['error']) ? '. <a href="' . $arr['download'] . '">' . app::lang('download') . '</a>' : '') . '
            </td>
        </div>';
}
?>
</div>

<p style="margin-bottom:20px;<?php 
echo $hasErrors ? 'color:red;' : '';
?>
">
    <?php 
echo app::lang('step2_txt' . ($hasErrors ? '2' : '1'));
?>
</p>

<form action="/install/<?php 
echo $hasErrors ? '2' : '3';
?>
" class="data-form" method="post">
    <div class="submit">
        <input type="submit" value="<?php 
echo app::lang($hasErrors ? 'refresh' : 'next');
?>
" class="button">
    </div>
</form>
开发者ID:ValenokPC,项目名称:tabernacms,代码行数:30,代码来源:step2.php

示例4: foreach

 4. <?php 
echo app::lang('step4_title');
?>
</h4>

<form action="/install/4" class="data-form" method="post">

    <div class="required_global"><?php 
echo app::lang('required_global');
?>
</div>
    <?php 
foreach ($f as $key => $arr) {
    echo '<div class="row' . ($arr['error'] ? ' error' : '') . '">
            <label>
                <input type="text" name="' . $key . '" value="' . $arr['value'] . '" style="width:300px;">
                <span class="title">' . $arr['label'] . ($arr['required'] ? '<span class="required">*</span>' : '') . ':</span>
            </label>
            <span class="msg">' . $arr['error'] . '</span>
        </div>';
}
?>

    <div class="submit" style="margin-top:20px;">
        <input type="submit" value="<?php 
echo app::lang('next');
?>
" class="button">
    </div>

</form>
开发者ID:ValenokPC,项目名称:tabernacms,代码行数:31,代码来源:step4.php

示例5: empty

?>

<form action="/install/5" class="data-form" method="post">

    <input type="hidden" name="install" value="<?php 
echo empty($error) ? 'start' : 'restart';
?>
">

    <div id="pre_install">
        <p><?php 
echo empty($error) ? app::lang('step5_txt1') : '';
?>
</p>
        <input type="submit" value="<?php 
echo app::lang((!empty($error) ? 're' : '') . 'start');
?>
" class="button" onclick="
            $('#error_install').hide(0);
            $('#pre_install').hide(0);
            $('#post_install').show(0);
            return true;">
    </div>
</form>

<div id="post_install">
    <?php 
echo app::lang('installation');
?>
 <img src="/install/img/i.gif">
</div>
开发者ID:ValenokPC,项目名称:tabernacms,代码行数:31,代码来源:step5.php

示例6:

<h3><?php 
echo app::lang('start_greeting');
?>
</h3>

<p><?php 
echo app::lang('start_txt1');
?>
</p>

<ul id="select_language">
    <li>
        <form action="/install/" class="data-form" method="post">
            <input type="hidden" name="lang" value="ru">
            <button type="submit"><img src="/image.php?m=core&p=language_medium&f=lang/2_lng7f263f544635e3cd184fb6fac223781c.gif" alt=""> Русский</button>
        </form>
    </li>
    <li>
        <form action="/install/" class="data-form" method="post">
            <input type="hidden" name="lang" value="ukr">
            <button type="submit"><img src="/image.php?m=core&p=language_medium&f=lang/29_lng6f47df546e1ecd5245fde4d9e28193e0.gif" alt=""> Український</button>
        </form>
    </li>
    <li>
        <form action="/install/" class="data-form" method="post">
            <input type="hidden" name="lang" value="en">
            <button type="submit"><img src="/image.php?m=core&p=language_medium&f=lang/29_lng6f47df546e1ecd5245fde4d9e28193e2.gif" alt=""> English</button>
        </form>
    </li>
    <li>
        <form action="/install/" class="data-form" method="post">
开发者ID:ValenokPC,项目名称:tabernacms,代码行数:31,代码来源:start.php

示例7:

                <input type="text" name="' . $key . '" value="' . $arr['value'] . '" style="width:300px;">
                <span class="title">' . $arr['label'] . ($arr['required'] ? '<span class="required">*</span>' : '') . ':</span>
            </label>
            <span class="msg">' . $arr['error'] . '</span>
        </div>';
}
?>

    <div class="submit" style="margin-top:20px;">
        <span style="display:none;" id="next_value"><?php 
echo app::lang('next');
?>
</span>
        <img src="/install/img/ajax.gif" alt="<?php 
echo app::lang('server_response');
?>
" style="margin-right:5px;display:none;" align="bottom" id="ajax_indication">
        <span style="margin-right:5px;color:red;display:none;" id="error_msg"></span>
        <span style="margin-right:5px;color:green;display:none;" id="success_msg"><?php 
echo app::lang('test_successful');
?>
</span>
        <input type="submit" value="<?php 
echo app::lang('test_connection');
?>
" class="button test_connect">
    </div>

</form>

<script src="/install/testConnect.js" type="text/javascript"></script>
开发者ID:ValenokPC,项目名称:tabernacms,代码行数:31,代码来源:step3.php

示例8: determineLocale

 /**
  * Detetermine Locale from current HTTP request
  */
 protected function determineLocale()
 {
     if (isset($_COOKIE['locale']) && isset(self::$locales[$_COOKIE['locale']])) {
         $this->locale = $_COOKIE['locale'];
     } else {
         $this->locale = app::$config['localization']['default_language'];
     }
     setlocale(LC_ALL, $this->locale);
     date_default_timezone_set(app::$config['localization']['timezone']);
     $pathCache = 'var/cache/' . $this->locale . '-lang';
     $lang = '';
     if (is_file($pathCache . '.php')) {
         include $pathCache . '.php';
     } else {
         foreach (app::$activeModules as $moduleName => $type) {
             if (is_file('modules/' . $moduleName . '/locale/' . $this->locale . '.php')) {
                 include 'modules/' . $moduleName . '/locale/' . $this->locale . '.php';
             }
         }
         $config = new \config($pathCache . '.php', TRUE);
         $config->setVariable('lang');
         $config->saveConfig($lang);
         \tools::file_put_contents($pathCache . '.js', substr($config->getContent(), 5, false));
     }
     app::$lang = $lang;
 }
开发者ID:saitinet,项目名称:parsimony,代码行数:29,代码来源:request.php


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