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


PHP i18n::output方法代码示例

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


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

示例1: date

<?php

use thom855j\PHPI18n\I18n, thom855j\PHPHtml\Form, thom855j\PHPHttp\Input;
?>
<h2 class="sub-header"><?php 
i18n::output('POST_CREATE', $this->controller);
?>
</h2> 
<?php 
Form::start($this->project_url, 'post', true);
Form::label('title', i18n::get('POST_TITLE', $this->controller), "class='control-label'");
Form::input('text', 'title', Input::exists(Input::get('title')), "class='form-control' required");
Form::label('start_date', i18n::get('POST_START', $this->controller), "class='control-label'");
Form::input('text', 'start_date', date($this->date_format), "class='form-control' required");
Form::label('end_date', i18n::get('POST_END', $this->controller), "class='control-label'");
Form::input('text', 'end_date', null, "class='form-control' required");
Form::label('body', i18n::get('POST_CONTENT', $this->controller), "class='control-label'");
Form::textarea('body', " class='form-control'", Input::exists(Input::get('body')));
foreach ($this->results->categories as $cat) {
    if ($cat->Parent_ID == 0 || $cat->ID == $cat->Parent_ID) {
        $options[] = Form::options($cat->ID, '-' . $cat->Label);
    } else {
        $options[] = Form::options($cat->ID, $cat->Label);
    }
}
if (isset($this->results->uploads)) {
    $path = $this->project_url . '/public/uploads/thumbs/';
    foreach ($this->results->uploads as $upload) {
        $selected = '';
        $thumb = '';
        foreach ($this->results->upload_item as $upload_item) {
开发者ID:peterbrinck,项目名称:PHPMvcCms,代码行数:31,代码来源:create.php

示例2: date

<?php

use thom855j\PHPI18n\I18n, thom855j\PHPHtml\Form;
?>
<h2 class="sub-header"><?php 
i18n::output('POST_UPDATE', $this->controller);
?>
</h2> 
<?php 
foreach ($this->results->data as $view) {
    Form::start($this->current_url, "post", true);
    Form::label('title', i18n::get('POST_TITLE', $this->controller), "class='control-label'");
    Form::input('text', 'title', $view->Title, "class='form-control'");
    Form::label('start_date', i18n::get('POST_START', $this->controller), "class='control-label'");
    Form::input('text', 'start_date', date($this->date_format, $view->Start_date), "class='form-control'");
    Form::label('end_date', i18n::get('POST_END', $this->controller), "class='control-label'");
    Form::input('text', 'end_date', date($this->date_format, $view->End_date), "class='form-control'");
    Form::label('body', i18n::get('POST_CONTENT', $this->controller), "class='control-label'");
    Form::textarea('body', " class='form-control'", $view->Body);
    foreach ($this->results->categories as $cat) {
        if (isset($this->results->post_cat)) {
            $extra = '';
            foreach ($this->results->post_cat as $post_cat) {
                if ($post_cat->Cat_ID === $cat->ID) {
                    $extra = "selected";
                }
            }
        }
        if ($cat->Parent_ID == 0 || $cat->ID == $cat->Parent_ID) {
            $options[] = Form::options($cat->ID, '-' . $cat->Label, $extra);
        } else {
开发者ID:peterbrinck,项目名称:PHPMvcCms,代码行数:31,代码来源:update.php

示例3: confirm

        }
        $form = "<form action='" . $this->project_url . "admin/delete/post/" . $this->type . "' method='post' onsubmit=\"return confirm('Er du sikker?')\"><input type='hidden' name='id' value='" . $view->ID . "'>" . "<input type='submit' value='" . i18n::get('POST_DELETE', $this->controller) . "' class='btn btn-danger'></form>";
        Table::data(array("#" . $view->ID, $view->Title . " <small>(" . $view->Slug . ")</small>", $created, $updated, " <small>(" . $view->Username . ")</small>", "<a class='btn btn-success' href='" . $this->project_url . 'admin/update/post/' . $this->type . '/' . $view->ID . "'>" . i18n::get('POST_UPDATE', $this->controller) . "</a>", $form));
    }
    Table::end();
    ?>
 
    </div> 
    <p>Sider:</p> 
    <?php 
    for ($x = 1; $x <= $this->results->total; $x++) {
        ?>
 
        <a class="btn btn-default" href="<?php 
        echo $this->project_url . "admin/read/post/{$this->type}/" . $x;
        ?>
"><?php 
        echo $x;
        ?>
</a> 
        <?php 
    }
} else {
    ?>
 
    <p><?php 
    i18n::output('POST_EMPTY', 'post');
    ?>
</p> 
    <?php 
}
开发者ID:peterbrinck,项目名称:PHPMvcCms,代码行数:31,代码来源:read.php

示例4:

</label>
        <input type="text" name="username" id="inputEmail" class="form-control" placeholder="<?php 
i18n::output('VIEW_USERNAME', 'users');
?>
" required="" autofocus="">
        <label for="inputPassword" class="control-label"><?php 
i18n::output('VIEW_PASSWORD', 'auth');
?>
</label>
        <input type="password" name="password" id="inputPassword" class="form-control" placeholder="<?php 
i18n::output('VIEW_PASSWORD', 'auth');
?>
" required="">
        <div class="checkbox">
            <label>
                <input type="checkbox" class="control-label" name="remember-me"> <?php 
i18n::output('REM_ME', 'auth');
?>
            </label>
        </div>
        <button class="btn btn-lg btn-primary btn-block" type="submit"><?php 
i18n::output('VIEW_LOGIN', 'auth');
?>
</button><br>
        <a href="<?php 
echo URL . '../';
?>
">Tilbage til hjemmeside</a>
    </form>

</div> <!-- /container -->
开发者ID:peterbrinck,项目名称:PHPMvcCms,代码行数:31,代码来源:login.php


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