mmelcor/yii2-transconv

A program to convert php translation files to po translation files.

Installs: 34

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 2

Forks: 0

Open Issues: 0

Type:yii2-extension

0.1.0 2016-02-16 21:13 UTC

This package is not auto-updated.

Last update: 2024-05-11 16:40:07 UTC


README

A program to convert php translation files to po translation files.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist mmelcor/yii2-transconv "*"

or add

"mmelcor/yii2-transconv": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by adding the following to your console\config\main-local.php file (advanced) or config\console.php (basic) :

return [
	'bootstrap' => [ '[Other boostrap items]', 'transconv'],
	'modules' => [
		'[other modules]' => '[other module paths]',
		'transconv' => 'mmelcor\yii2transconv\Module',
	],
];

Then you can call

php yii transconv path/to/messages/

Before or after the conversion make sure that your i18n.php and i18n configuration have been set to use po files according to the Yii2 Internationalization setup. For more info see Yii2 Documentation.