Download the PHP package coding-socks/lost-in-translation without Composer
On this page you can find all versions of the php package coding-socks/lost-in-translation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download coding-socks/lost-in-translation
More information about coding-socks/lost-in-translation
Files in coding-socks/lost-in-translation
Package lost-in-translation
Short Description This package helps to find missing translation strings in your Laravel blade files
License MIT
Informations about the package lost-in-translation
Lost in Translation
This package helps to find missing translation strings in your Laravel blade files.
Installation
You can easily install this package using Composer, by running the following command:
Usage
You can list all missing translation for a specific location using the command below.
Example:
It is sometimes recommended to increase the verbosity using -v
flag. In verbose mode the command will print warnings and errors to the standard output.
Publish
Publish the configuration file only:
Publish the Command class only:
Defaults
The command considers app.locale
as your applications default locale.
The command scans your lang
directory for comparison with the default and target locale.
The command scans your app
, and resources/views
directory for translation retrieval.
The command detects the following in your blade and application files:
@lang('key')
Blade directives are compiled toapp('translator')->get('key')
__('key')
any call to the__
functiontrans('key')
any call to thetrans
functiontrans_choice('key', x)
any call to thetrans_choice
functionapp('translator')->get('key')
any directget
method call on thetranslator
App::make('translator')->get('key')
any directget
method call on thetranslator
Lang::get('key')
anyget
static call on theLang
facade<<<'blade'
inline components in nowdoc withblade
label are compiled and their content is scanned.
Help
Implementation
This implementation reads all your blade files, compiles them to PHP (illuminate/view), parses them as PHP (nikic/php-parser), and then finds the relevant nodes in the AST.
This, in my opinion, is a cleaner and less error-prone than using regular expressions.
All versions of lost-in-translation with dependencies
illuminate/console Version ^9.0 || ^10.0 || ^11.0 || ^12.0
illuminate/filesystem Version ^9.0 || ^10.0 || ^11.0 || ^12.0
illuminate/support Version ^9.0 || ^10.0 || ^11.0 || ^12.0
illuminate/translation Version ^9.0 || ^10.0 || ^11.0 || ^12.0
illuminate/view Version ^9.0 || ^10.0 || ^11.0 || ^12.0
nikic/php-parser Version ^4.18 || ^5.0