Skip to content

A Yii2 extension for converting php translation files to po files

Notifications You must be signed in to change notification settings

mmelcor/yii2-transconv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yii2 PHP to PO translation file converter

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.

About

A Yii2 extension for converting php translation files to po files

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages