PHPackages                             coding-socks/lost-in-translation - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Localization &amp; i18n](/categories/localization)
4. /
5. coding-socks/lost-in-translation

ActiveLibrary[Localization &amp; i18n](/categories/localization)

coding-socks/lost-in-translation
================================

This package helps to find missing translation strings in your Laravel blade files

v0.3.5(10mo ago)10117.0k—9.8%4[2 issues](https://github.com/coding-socks/lost-in-translation/issues)[2 PRs](https://github.com/coding-socks/lost-in-translation/pulls)MITPHPPHP ^8.0CI passing

Since Jan 15Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/coding-socks/lost-in-translation)[ Packagist](https://packagist.org/packages/coding-socks/lost-in-translation)[ RSS](/packages/coding-socks-lost-in-translation/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (8)Versions (10)Used By (0)

Lost in Translation
===================

[](#lost-in-translation)

This package helps to find missing translation strings in your Laravel blade files.

Installation
------------

[](#installation)

You can easily install this package using Composer, by running the following command:

```
composer require coding-socks/lost-in-translation --dev

```

Usage
-----

[](#usage)

You can list all missing translation for a specific location using the command below.

```
php artisan lost-in-translation:find {locale}

```

Example:

```
php artisan lost-in-translation:find nl

```

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)

Publish the configuration file only:

```
php artisan vendor:publish --tag=lost-in-translation-config

```

Publish the Command class only:

```
php artisan vendor:publish --tag=lost-in-translation-commands

```

Defaults
--------

[](#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 to `app('translator')->get('key')`
- `__('key')` any call to the `__` function
- `trans('key')` any call to the `trans` function
- `trans_choice('key', x)` any call to the `trans_choice` function
- `app('translator')->get('key')` any direct `get`method call on the `translator`
- `App::make('translator')->get('key')` any direct `get` method call on the `translator`
- `Lang::get('key')` any `get` static call on the `Lang` facade
- `
