Download the PHP package umbalaconmeogia/yii2-i18nui without Composer
On this page you can find all versions of the php package umbalaconmeogia/yii2-i18nui. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download umbalaconmeogia/yii2-i18nui
More information about umbalaconmeogia/yii2-i18nui
Files in umbalaconmeogia/yii2-i18nui
Package yii2-i18nui
Short Description GUI for editing i18n translation in database
License MIT
Informations about the package yii2-i18nui
GUI for editing i18n translation in database.
For more about internationalization in yii2, see the guide.
This is inspired by wokster/yii2-translation-manage.
Edit composer.json
Run
or add "umbalaconmeogia/yii2-i18nui": "*"
to composer.json then run composer update
Edit config
Add to modules in config
Config i18n like:
Run yii2 migration
To add database tables to store i18n data, run migration
Access to translation manager
Select language
This module contains some function to set language for your yii2 application.
-
To change language, add the config below into your web config (config/web.php or frontend/config/main.php)
- To add link to change config, use /i18nui/default/set-language. For example, add to menu
Import message data from CSV
To import i18n data from CSV, run command
while i18n.csv is created as bellow (the first row is the header, with the first key is category, the second key is message, follow by language codes) | category | message | ja | vi |
---|---|---|---|---|
app | house | 家 | nhà | |
app | home | 家庭 | gia đình |
Add language related menu items
Add menu items as sub-menu
Add language related menu as sub menu items on menu bar.
Add menu items as sub-sub-menu
Add language related menu as an item of sub menu on menu bar.
Use kartik-v/yii2-nav-x to display sub-sub-menu easily.
Use another Message, SourceMessage classes
If you want to use your own Message, SourceMessage classes, define them and declared in configuration of i18nui.
For example.
Config
Class frontent\models\NewMessage