PHPackages                             singlequote/laravel-locale-finder - 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. singlequote/laravel-locale-finder

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

singlequote/laravel-locale-finder
=================================

1.0.21(7mo ago)93.3k↓50%MITPHPPHP ^8.0

Since Apr 12Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/singlequote/laravel-locale-finder)[ Packagist](https://packagist.org/packages/singlequote/laravel-locale-finder)[ Docs](https://github.com/singlequote/laravel-locale-finder)[ RSS](/packages/singlequote-laravel-locale-finder/feed)WikiDiscussions main Synced 1mo ago

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

Laravel Translation Finder
==========================

[](#laravel-translation-finder)

This package scans your project files (like Blade, PHP, and script files) for translation keys (\_\_("...") or @lang("...")), automatically translates them into your specified languages using an external translation service, and saves them to the correct language files. It also helps maintain clean language files by removing keys that are no longer in use.

[![Latest Version on Packagist](https://camo.githubusercontent.com/70fb8c52e971aad0490b0e0aa48532e5ec9a81e4ad88a8c63e301dd58308a208/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73696e676c6571756f74652f6c61726176656c2d6c6f63616c652d66696e6465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/singlequote/laravel-locale-finder)[![Total Downloads](https://camo.githubusercontent.com/f7035a89248124265f2471ec99cc7b549eb536220d68341f5e627f1b3c3721d5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73696e676c6571756f74652f6c61726176656c2d6c6f63616c652d66696e6465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/singlequote/laravel-locale-finder)

### Installation

[](#installation)

Install the package via Composer. It's recommended to install it as a development dependency since it's typically only used during development.

```
composer require singlequote/laravel-locale-finder --dev
```

### Publish config

[](#publish-config)

You can change the behaviour of the package by editing the config file. Publish the config file with the command below.

```
php artisan vendor:publish --tag=locale-finder
```

### Usage

[](#usage)

The package searches for translations key in your blade files. For example `{{ __("My translation") }}`. Or `@lang('My Translation')`. After searching the package will try to translate the keys using the google [translate package](https://github.com/Stichoza/google-translate-php).

> When removing translations from your view, the package will also remove the keys from the files.

The command can be used from the commandline

For example, find and translate all dutch translation keys

```
php artisan locale:find --locales=nl
```

or find and translate the dutch and german translations keys

```
php artisan locale:find --locales=nl,de
```

#### Translate all available locales

[](#translate-all-available-locales)

The `all` option will scan your lang folder and select the available .json files.

```
php artisan locale:find --locales=all
```

#### Change source

[](#change-source)

If you develop your application in a different language you can change the defualt source from `en` to something else.

```
php artisan locale:find --locales=nl --source=de
```

#### Disabling key translations

[](#disabling-key-translations)

If you would like to just get the keys from your views, you can use the `--notranslate` option. This will fill the values with the default keys.

```
php artisan locale:find --locales=nl --notranslate
```

#### Exclude keys

[](#exclude-keys)

If you want the package to only search for specific translation keys, you can use the `--only` option. This will exclude everthing outside the `--only` scope.

```
php artisan locale:find --locales=nl --only=app
```

The above will exclude every translation key that doesn't belong in the `app` directive.

For example:

```
__("app.this will be included");
__("users.i am not included");
```

**Add multiple only keys to your command**

```
php artisan locale:find --locales=nl --only=app,users
```

**Using patterns**

When using modules or large translation files, it can be a lot of work to fill the `--only` option with all keys. You can use the `*` pattern to include keys. For example if you execute the command below:

```
php artisan locale:find --locales=nl --only=user*
```

```
__("users.i am included");
__("user.i am also included");
__("username.i am also included!");
__("use.i am not included :-(");
```

#### Create missing php key files

[](#create-missing-php-key-files)

When adding new translations keys such as `__("newkey.some text")` the file `newkey.php` should exists in order to add the translation keys. When using the `--create` option the package will auto generate these files.

```
php artisan locale:find --create
```

### Beta

[](#beta)

#### Modules

[](#modules)

When using modules in your laravel package with their own lang folder, you would like to add the keys to the right files in the module folders.

So for example when we have a module called `Horses` and we loaded the translations using `$this->loadTranslationsFrom(PATHTOTRANS, "horses");` in our Service provider. The key should be something like this : `__("horses::")` and with a translation `__("horsed.colors.red")` where `colors.php` is the file.

When using the `--modules` option, the package will auto detect the loaded translation files and adds the keys to the right files.

```
php artisan locale:find --modules
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Postcardware
------------

[](#postcardware)

You're free to use this package, but if it makes it to your production environment we highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using.

Our address is: Quotec, Traktieweg 8c 8304 BA, Emmeloord, Netherlands.

Credits
-------

[](#credits)

- [Wim Pruiksma](https://github.com/wimurk)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance63

Regular maintenance activity

Popularity26

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~48 days

Recently: every ~244 days

Total

27

Last Release

231d ago

Major Versions

0.0.5 → 1.0.02022-04-12

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/14072334?v=4)[Wimurk](/maintainers/wimurk)[@wimurk](https://github.com/wimurk)

---

Top Contributors

[![wimurk](https://avatars.githubusercontent.com/u/14072334?v=4)](https://github.com/wimurk "wimurk (53 commits)")

---

Tags

laraveltranslationslocaleauto

### Embed Badge

![Health badge](/badges/singlequote-laravel-locale-finder/health.svg)

```
[![Health](https://phpackages.com/badges/singlequote-laravel-locale-finder/health.svg)](https://phpackages.com/packages/singlequote-laravel-locale-finder)
```

###  Alternatives

[vemcogroup/laravel-translation

Translation package for Laravel to scan for localisations and up/download to poeditor

135304.0k2](/packages/vemcogroup-laravel-translation)[laravel-lang/locales

Basic functionality for working with localizations

134.5M12](/packages/laravel-lang-locales)[genl/matice

Use your Laravel translations in JavaScript. Generates a Blade directive exporting all of your Laravel translations and provides a nice trans() helper function in JavaScript.

101339.4k2](/packages/genl-matice)[statikbe/laravel-chained-translator

The Laravel Chained Translator can combine several translators that can override each others translations.

36149.4k6](/packages/statikbe-laravel-chained-translator)[optimistdigital/nova-locale-manager

Laravel Nova tool to manage locales.

167.0k](/packages/optimistdigital-nova-locale-manager)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
