rolice/lang-sync

Parse templates, extracts laguages and sync them through different translations.

Installs: 4

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 0

Open Issues: 0

pkg:composer/rolice/lang-sync

dev-master 2015-10-12 15:22 UTC

This package is not auto-updated.

Last update: 2025-10-11 23:38:23 UTC


README

Language Extractor and Synchroniser

This package is developed for Laravel 4.2. Larvel 5.0+ support is comming soon.

How it works?

The package will walk through the application files and will search for any Lang::get or @lang statements and will check for translation in the proper language file. A new file will be created, in case no file exists or a line will be put in the langauge file if the exact translation is missing.

All language files will be parsed with a unified translation code-style.

Installation

You can easily install the package in your Laravel project by simply executing the following command:

composer require rolice/lang-sync

After the installation you have to add the service provider in app config:

'Rolice\LangSync\LangSyncServiceProvider'

for PHP 5.6+ you can add the following:

Rolice\LangSync\LangSyncServiceProvider::class

Usage

The usage is done through artisan command. This is done through command line like:

php artisan locale:extract

You can easily call it programmatically from your PHP code like, in case command line is not accessible:

Artisan::call('locale:extract')