2017 © Pedro Peláez
 

library laravel-translator

PHP Laravel artisan command that extracting translation contents and updating translation files automatically

image

alexeybob/laravel-translator

PHP Laravel artisan command that extracting translation contents and updating translation files automatically

  • Wednesday, June 6, 2018
  • by alexeybob
  • Repository
  • 1 Watchers
  • 0 Stars
  • 22 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 10 % Grown

The README.md

Laravel Translations

The most time-consuming tasks when translating an application is to extract all the template contents to be translated and to keep all the translation files in sync. This package includes a command called translation:update that helps you with these tasks., (*1)

Installation

$ composer require alexeybob/laravel-translator dev-master

Commands:

Update Command:

Update translations from source code., (*2)

$ php artisan translation:update {locale} {--force} {--dump-messages}

Arguments:, (*3)

Name Description Default
locale The locale -
path Directory where to extract the messages views

Options:, (*4)

Name Description Default
force Should the update be done false
dump-messages Should the messages be dumped in the console false
no-backup Should backup not be done false
clean Should clean not found messages. But we will ignore next files: 'validation', 'auth', 'passwords', 'pagination' false
prefix Override the default prefix. __,@lang,trans_choice,@choice,__ab,@lang_ab,trans_choice_ab,@choice_ab

Update Untracked Command:

Update translations with untracked messages., (*5)

If you want to be able to tracked untracked messages please use __ab and trans_choice_ab., (*6)

What is untracked message: {{ __($message) }} or {{ trans_choice($message, 5, ['value' => 5]) }}., (*7)

When you use __ab, trans_choice_ab, @lang_ab or @choice_ab function they will work the same way as __, trans_choice``@lang or @choice plus loging all messages to the special log file., (*8)

$ php artisan translation:untracked {locale} {--force} {--dump-messages}

Arguments:, (*9)

Name Description Default
locale The locale -

Options:, (*10)

Name Description Default
force Should the update be done false
dump-messages Should the messages be dumped in the console false
no-backup Should backup not be done false

Diff Command:

Difference between translation files and source code messages., (*11)

php artisan translation:diff en

Arguments:, (*12)

Name Description Default
locale The locale -
path Directory where to extract the messages views

Options:, (*13)

Name Description Default
prefix Override the default prefix. __,@lang,trans_choice,@choice,__ab,@lang_ab,trans_choice_ab,@choice_ab

if for any reason artisan can't find commands, you can register the provider manually on your config/app.php file:, (*14)

return [
    ...
    'providers' => [
        ...
        AB\Laravel\Translator\ServiceProvider::class,
        ...
    ]
]

The Versions

06/06 2018

dev-master

9999999-dev https://github.com/alexeybob/laravel-translator

PHP Laravel artisan command that extracting translation contents and updating translation files automatically

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexey Bob

laravel command translation translator localization laravel-translator

06/06 2018

v1.2.1

1.2.1.0 https://github.com/alexeybob/laravel-translator

PHP Laravel artisan command that extracting translation contents and updating translation files automatically

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexey Bob

laravel command translation translator localization laravel-translator

04/06 2018

v1.2

1.2.0.0 https://github.com/alexeybob/laravel-translator

PHP Laravel artisan command that extracting translation contents and updating translation files automatically

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexey Bob

laravel command translation translator localization laravel-translator

11/04 2018

v1.1

1.1.0.0

Laravel artisan command that extracting translation contents and updating translation files automatically

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexey Bob

10/04 2018

v1.0

1.0.0.0

Laravel Command that extracting Translation Contents and Updating Translation File Automatically

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexey Bob