承接 symfocode/twig-i18n 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

symfocode/twig-i18n

最新稳定版本:v0.2.3

Composer 安装命令:

composer require symfocode/twig-i18n

包简介

Twig internationalization tools for Symfony2

README 文档

README

SensioLabsInsight Latest Stable Version Latest Unstable Version Total Downloads License

Internationalization tools based on Symfony2 components and Twig.

Twig-i18n works with PHP 5.3.3 or later.

Features

  • The LinkI18nExtension makes it easy to create locale links. Learn more.
<ul class="nav">
    <li {{- active_link('home') }}>
        <a href="{{ path('home') }}">Home</a>
    </li>
    <li {{- active_link('about') }}>
        <a href="{{ path('about') }}">Page</a>
    </li>
    <li {{- active_link('contacts', 'last-nav-item') }}>
        <a href="{{ path('contacts') }}">Some page (default locale)</a>
    </li>
</ul>
<ul class="lang">
    {% for locale, params in app.system_locales %}
    <li {{- active_locale(locale, params.flag) }}>
        <a href="{{ path(active_route(), {'_locale': locale}) }}" title="{{ params.name }}">
            {{ params.abbr }}
        </a>
    </li>
    {% endfor %}
</ul>
  • The DateI18nExtension makes it easy to create custom date formats. Learn more.
<div>{{ datetime|localedate('date_time') }}</div>
<div>{{ datetime|localedate('short_date') }}</div>
<div>{{ datetime|localedate('medium_date') }}</div>

<div>{{ datetime|locale_date('long_date') }}</div>
<div>{{ datetime|locale_date('full_date') }}</div>
<div>{{ datetime|locale_date('some_format') }}</div>

Installation

The recommended way to install Silex-i18n is through composer. Just create a composer.json file and run the php composer.phar install command to install it:

{
    "require": {
        "symfocode/twig-i18n": "~0.2"
    }
}

License

Twig-i18n is licensed under the MIT license.

统计信息

  • 总下载量: 38
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-11-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固