定制 paliari/php-i18n 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

paliari/php-i18n

最新稳定版本:1.2.0

Composer 安装命令:

composer require paliari/php-i18n

包简介

README 文档

README

Installation

$ composer require paliari/php-i18n

Configuration

Create your yml locale files inside some folder in your project. See the yml file example:

pt-BR:
  hello: Olá I18n
  user:
    name: Nome do usuário
  errors:
    messages:
      unauthorized: Não autorizado

You can use multiple languages and multiple files for each language, ex:

  • pt-BR.yml
  • models.pt-BR.yml
  • errors.pt-BR.yml
  • en.yml
  • models.en.yml
  • errors.en.yml

Say to the plugin where this files were placed

\Paliari\I18n::instance()->addLocalesPath(__DIR__ . '/config/locales')->setCurrentLocale('pt-BR');

Usage

Paliari\I18n::instance()->hum('hello');

Authors

统计信息

  • 总下载量: 3.36k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-09-15