2017 © Pedro Peláez
 

yii2-extension yii2-i18n

Internationalization extension for Yii2 framework

image

yiithings/yii2-i18n

Internationalization extension for Yii2 framework

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Yii2 I18N

Build Status Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

Internationalization extension for Yii2 framework., (*2)

This extension use Gettext as message source and provide Web GUI(gii) editing message source., (*3)

Installation

The preferred way to install this extension is through composer., (*4)

Either run, (*5)

php composer.phar require --prefer-dist yiithings/yii2-i18n "*"

or add, (*6)

"yiithings/yii2-i18n": "*"

to the require section of your composer.json file., (*7)

Usage

Once the extension is installed, simply use it in your code by :, (*8)

Add the component to your application., (*9)

'components' => [
    'i18n' => [
        'class' => 'yiithings\i18n\I18N'
    ]
]

Use functions:, (*10)

echo __('Username');
__('Username'); // with echo
echo _x('Username', 'yii');
_xe('Username', 'yii'); // with echo

Edit messages:, (*11)

Use PoEdit create or edit your messages. .po and .mo files default save path is @app/messages/, e.g. @app/messages/en-US.mo. If you want to change path rule, please see GettextMessageSource Class., (*12)

The Versions

23/04 2018

dev-master

9999999-dev

Internationalization extension for Yii2 framework

  Sources   Download

MIT

The Requires

 

The Development Requires

extension yii2 i18n internationalization