kosatyi/localize

Gettext translation files generator

v1.0.1 2021-04-12 19:34 UTC

This package is auto-updated.

Last update: 2024-05-04 18:48:42 UTC


README

PHP Gettext translation generator from project files

68747470733a2f2f706f7365722e707567782e6f72672f6b6f73617479692f6c6f63616c697a652f76657273696f6e 68747470733a2f2f706f7365722e707567782e6f72672f6b6f73617479692f6c6f63616c697a652f646f776e6c6f616473 68747470733a2f2f706f7365722e707567782e6f72672f6b6f73617479692f6c6f63616c697a652f6c6963656e7365

Installation

System Requirements

PHP 5.4 and later.

Dependencies

Localize require the following extension in order to work properly:

Install with Composer

If you’re using Composer, you can run the following command:

composer require kosatyi/localize

Or add dependency manually in composer.json

{
  "require": {
    "kosatyi/localize":"^1.0"
  }
}

Basic Usage

require 'vendor/autoload.php';
use Kosatyi\Localize\Parser;
$localize = new Parser(array(
    'target'  => '.locales',
    'sources' => array('./src','./templates'),
    'locales' => array('en','ru')
));
$localize->initialize();