Yii 2.0: yii2-excel-message

Translate messages via excel files


With this extension you can export messages from PHP message files to Excel, send them to your translators and read them back into your message files.

note: To read and write to and from Excel file, we use the excellent PHPExcel package.


Install the package with composer.

composer require codemix/yii2-excel-message

Then update your console configuration:

return [
    'controllerMap' => [
        'excel-message' => [
            'class' => 'codemix\excelmessage\ExcelMessageController'
    // ...

Creating Excel files with new translations

To create Excel files with new translations, you need to supply the Yii2 message configuration and the output directory where the files should be written to:

./yii excel-message messages/config.php /output/dir

This will create one file per language (filename == language) with one sheet per category. The source messages are listed in column A. Translators should add their translations to column B.

The files will be in Excel2007 format with xlsx extension.

Update PHP message files from Excel files

After you receive the Excel files back from your translators you can update your PHP message files. Again you need to supply the Yii2 message configuration and the directory path where your Excel files are:

./yii excel-message/import messages/config.php /input/dir

This will add the new translations to your PHP message files. Yes it's really that simple.


Find more details on our project page at Github:


Be the first person to leave a comment

Please to leave your comment.

Create extension
No downloadable files yet
  • Yii Version: 2.0
  • License: MIT License
  • Developed by: Mike
  • Category: Others
  • Votes: No votes yet
  • Downloaded: 0 times
  • Created on: Aug 15, 2015
  • Last updated: Aug 15, 2015
  • Tags: I18N, messages, excel