Download the PHP package vintage/yii2-i18n without Composer
On this page you can find all versions of the php package vintage/yii2-i18n. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vintage/yii2-i18n
More information about vintage/yii2-i18n
Files in vintage/yii2-i18n
Package yii2-i18n
Short Description Internalization module for automatic adding of translations to database
License BSD-3-Clause
Informations about the package yii2-i18n
Internalization module for Yii2
Internalization module for automatic adding of translations to database.
Based on Zelenin I18N module.
Installation
Install package
Run command
or add
to the require section of your composer.json.
Configuration
1) Configure I18N component in common part of your application
2) Configure module in backend part of your application
3) Applying migrations
Usage
Go to http://backend.your-app.dev/translations
for translating of messages.
PHP to database import
If you have an old project with PHP-based i18n you may migrate to DbSource via console.
Run command
where @common/messages
is path to app translations
Database to PHP export
Run command
where @vintage/i18n/messages
is path to app translations and vintage/i18n
is translations category in DB.
Using yii
category with database
Import translations from PHP files
Configure I18N component
Caching
Cache will be updates automaticly if you updates translations in dashboard.
If you using \yii\caching\FileCache
your config should be like following
Other
Component uses yii\i18n\MissingTranslationEvent for auto-add of missing translations to database.
Read more about I18N in official guide.
Licence
This project is released under the terms of the BSD-3-Clause license.
Copyright (c) 2017, Vintage Web Production