yii2-excel-message Translate messages via excel files

  1. Features
  2. Installation
  3. Creating Excel files with new translations
  4. Update PHP message files from Excel files
  5. Project

Features

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.

Installation

Install the package with composer.

composer require codemix/yii2-excel-message

Then update your console configuration:

<?php
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.

Project

Find more details on our project page at Github:

https://github.com/codemix/yii2-excel-message

0 0
3 followers
0 downloads
Yii Version: 2.0
License: MIT
Category: Others
Developed by: Mike
Created on: Aug 15, 2015
Last updated: 8 years ago

Related Extensions