PHPackages                             jonasschen/laravel-lang-monitor - 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. jonasschen/laravel-lang-monitor

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

jonasschen/laravel-lang-monitor
===============================

Search for untranslated keys in your Laravel project

v4.0.0(9mo ago)55.4k—0%[4 PRs](https://github.com/jonasschen/laravel-lang-monitor/pulls)MITPHPPHP ^8.3CI passing

Since Jun 3Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/jonasschen/laravel-lang-monitor)[ Packagist](https://packagist.org/packages/jonasschen/laravel-lang-monitor)[ Docs](https://github.com/jonasschen/laravel-lang-monitor)[ Fund](https://bmc.link/jonasschen)[ GitHub Sponsors](https://github.com/jonasschen)[ RSS](/packages/jonasschen-laravel-lang-monitor/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (7)Dependencies (3)Versions (13)Used By (0)

 [![Logo](assets/lang_monitor_logo.png)](assets/lang_monitor_logo.png)

Laravel Lang Monitor
====================

[](#laravel-lang-monitor)

 [![New](assets/new.svg)](assets/new.svg) Now UI Version available!
-------------------------------------------------------------------

[](#---------now-ui-version-available)

[![Latest Version on Packagist](https://camo.githubusercontent.com/486971a59b31a6ccd74d8ddcc2bbafbd1b3f65047e26dfe449d41e256728033b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6f6e6173736368656e2f6c61726176656c2d6c616e672d6d6f6e69746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jonasschen/laravel-lang-monitor)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/2ec3eb6a8ca72ace75da4be18b644c4bf42809f2bd5814d3c0b77c7bb0b8d2a7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a6f6e6173736368656e2f6c61726176656c2d6c616e672d6d6f6e69746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jonasschen/laravel-lang-monitor)[![GitHub Actions](https://github.com/jonasschen/laravel-lang-monitor/actions/workflows/main.yml/badge.svg)](https://github.com/jonasschen/laravel-lang-monitor/actions/workflows/main.yml/badge.svg)

Automatically search for keys or phrases in your project that have no translations.

Using Laravel Lang Monitor, you can get all missing translations.

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

[](#installation)

You can install the package via composer:

```
composer require jonasschen/laravel-lang-monitor --dev
```

Publish the config, asset and view files using the artisan CLI tool:

```
php artisan vendor:publish --provider="Jonasschen\LaravelLangMonitor\Providers\LangMonitorServiceProvider"
```

This command will publish the following files:

- config/lang-monitor.php
- public/vendor/lang-monitor/css/lang-monitor.css
- public/vendor/lang-monitor/ico/lang-monitor.ico
- public/vendor/lang-monitor/images/lang\_monitor\_logo\_small.png
- public/vendor/lang-monitor/js/lang-monitor.js
- resources/views/vendor/lang-monitor/monitor.blade.php

### Available configurations

[](#available-configurations)

- abort\_if\_directory\_doesnt\_exist: If any configured directories of the "directories\_to\_search" array do not exist, the scanning process will be aborted, otherwise only an alert it will be logged in the console;
    - Default Value:

    ```
    'abort_if_directory_doesnt_exist' => false,
    ```
- abort\_if\_lang\_file\_doesnt\_exist: If any configured lang files of the "lang\_files" array do not exist, the scanning process will be aborted, otherwise only an alert it will be logged in the console;
    - Default Value:

    ```
    'abort_if_lang_file_doesnt_exist' => false,
    ```
- scan\_for\_unused\_translations: If enabled, will check if all key translations are in use and log unused keys;
    - Default Value:

    ```
    'scan_for_unused_translations' => true,
    ```
- directories\_to\_search: A list of directories where the package will perform the scanning process;
    - Default Value:

    ```
    'directories_to_search' => [
        'app',
        'resources/views',
    ],
    ```
- extensions\_to\_search: A list of file extensions that the package will consider to perform the scanning process;
    - Default Value:

    ```
    'extensions_to_search' => [
        'php',
        'js',
    ],
    ```
- lang\_files: A list of lang files where the package will try to search the translation keys;
    - Default Value:

    ```
    'extensions_to_search' => [
        'resources/lang/en.json',
    ],
    ```
- locale: The locale of the main project language. It will be used to perform an improved sorting of the untranslated keys when exporting a result;
    - Default Value:

    ```
    'locale' => 'en.utf8',
    ```
- middleware: Middleware stack wrapping all Lang Monitor routes. Adjust to control access to the UI.
    - Default Value:

    ```
    'middleware' => ['web'],
    ```
- ui\_path: URL path where the Lang Monitor UI will be available. Example: "lang-monitor" → ;
    - Default Value:

    ```
    'ui_path' => 'lang-monitor',
    ```

Usage via browser
-----------------

[](#usage-via-browser)

You can access the Lang Monitor UI by going to the URL below:

```
http://your-app.test/lang-monitor

```

You can customize the URL path by changing the "ui\_path" option in the config file **"/config/lang-monitor.php"**.

[![Lang Monitor UI](assets/ui_version_screenshot.png)](assets/ui_version_screenshot.png)

Usage via prompt
----------------

[](#usage-via-prompt)

Use the command below, it is that easy!

```
php artisan lang_monitor:scan
```

### Output example with missing translations

[](#output-example-with-missing-translations)

```
Key not found: [Nova senha] - Used in file [resources/views/auth/changepassword.blade.php:20]
Key not found: [Confirmar senha] - Used in file [resources/views/auth/changepassword.blade.php:22]
****************************************
*      LARAVEL LANG MONITOR REPORT     *
****************************************
* Found keys: 13564                    *
* Untranslated keys: 37                *
* Unique untranslated keys: 30         *
* Unused translations: 1474            *
****************************************

```

### Output example without missing translations

[](#output-example-without-missing-translations)

```
********************************************************
*       Great! All translations are working fine.      *
********************************************************

```

### Export untranslated keys to JSON file format

[](#export-untranslated-keys-to-json-file-format)

You can export a missing translation result for a file in a JSON format. Use the --export\_missed\_json\_file option like this:

```
php artisan lang_monitor:scan --export_missed_json_file=storage/logs/untranslateds.json
```

### Export untranslated keys to PHP file format

[](#export-untranslated-keys-to-php-file-format)

You can export a missing translation result for a file in a PHP format. Use the --export\_missed\_php\_file option like this:

```
php artisan lang_monitor:scan --export_missed_php_file=storage/logs/untranslateds.php
```

### Export untranslated keys to text file format

[](#export-untranslated-keys-to-text-file-format)

You can export a missing translation result for a file in a text format. Use the --export\_missed\_text\_file option like this:

```
php artisan lang_monitor:scan --export_missed_txt_file=storage/logs/untranslateds.txt
```

### Export unused keys to JSON file format

[](#export-unused-keys-to-json-file-format)

You can export unused keys result for a file in a JSON format. Use the --export\_unused\_json\_file option like this:

```
php artisan lang_monitor:scan --export_unused_json_file=storage/logs/unuseds.json
```

### Export unused keys to PHP file format

[](#export-unused-keys-to-php-file-format)

You can export unused keys result for a file in a PHP format. Use the --export\_unused\_php\_file option like this:

```
php artisan lang_monitor:scan --export_unused_php_file=storage/logs/unuseds.php
```

### Export unused keys to a text file format

[](#export-unused-keys-to-a-text-file-format)

You can export unused keys result for a file in a text format. Use the --export\_unused\_text\_file option like this:

```
php artisan lang_monitor:scan --export_unused_txt_file=storage/logs/unuseds.txt
```

Upgrade guide
-------------

[](#upgrade-guide)

### From version 2.x to 3.x

[](#from-version-2x-to-3x)

- You will need to publish the config file again to publish the new asset and view files;

```
php artisan vendor:publish --provider="Jonasschen\LaravelLangMonitor\Providers\LangMonitorServiceProvider"
```

- The "middleware" configuration option has been added, and its default value is "\['web'\]". If you want to change this behavior, you will need to manually add the option to the configuration file: "/config/lang\_monitor.php";
- The "ui\_path" configuration option has been added, and its default value is "lang-monitor". If you want to change this behavior, you will need to manually add the option to the configuration file: "/config/lang\_monitor.php";
- The "abort\_if\_directory\_doesnt\_exists" config option has been renamed to "abort\_if\_directory\_doesnt\_exist", and its default value is "false". If you don't manually rename it in your config file, this will be the new behavior;
- The "abort\_if\_lang\_file\_doesnt\_exists" config option has been renamed to "abort\_if\_lang\_file\_doesnt\_exist", and its default value is "false". If you don't manually rename it in your config file, this will be the new behavior;

### From version 2.0.x to 2.1.x

[](#from-version-20x-to-21x)

- The "scan\_for\_unused\_translations" configuration option has been added. Its default value is "false". If you want to change this behavior, you will need to manually add the option to the configuration file: "/config/lang\_monitor.php";

Translation function support
----------------------------

[](#translation-function-support)

This package supports @lang(), \_\_() and trans() functions.

Lang file format support
------------------------

[](#lang-file-format-support)

This package supports .php files and .json files formats.

Consider Sponsoring
-------------------

[](#consider-sponsoring)

Help me maintain this project, please consider looking at the [FUNDING](./.github/FUNDING.yml) file for more info.

[![Buy Me A Coffee](https://camo.githubusercontent.com/9f44ce2dc3b3eecdd02598900866ffc518801df1932849703dae1e5ce5031070/68747470733a2f2f7777772e6275796d6561636f666665652e636f6d2f6173736574732f696d672f637573746f6d5f696d616765732f6f72616e67655f696d672e706e67)](https://bmc.link/jonasschen)

#### BTC

[](#btc)

[![btc](https://private-user-images.githubusercontent.com/31046817/243049755-2f69a4aa-4ee2-442e-aa1f-4a1c0cde217c.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODMwMDEzNDksIm5iZiI6MTc4MzAwMTA0OSwicGF0aCI6Ii8zMTA0NjgxNy8yNDMwNDk3NTUtMmY2OWE0YWEtNGVlMi00NDJlLWFhMWYtNGExYzBjZGUyMTdjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzAyVDE0MDQwOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ0NDhkNjNmYjllZDU5YjUyYTM5M2NlYjJjOGZjZDBkZTZkZWIyMDVkYzBmMzkyZTQ5NWUyMTBhOGYxZjVmMzMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.TV0W3jWUahbIdWaPAIHVCNZnZZK9LBn0E90h6bW0REU)](https://private-user-images.githubusercontent.com/31046817/243049755-2f69a4aa-4ee2-442e-aa1f-4a1c0cde217c.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODMwMDEzNDksIm5iZiI6MTc4MzAwMTA0OSwicGF0aCI6Ii8zMTA0NjgxNy8yNDMwNDk3NTUtMmY2OWE0YWEtNGVlMi00NDJlLWFhMWYtNGExYzBjZGUyMTdjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzAyVDE0MDQwOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ0NDhkNjNmYjllZDU5YjUyYTM5M2NlYjJjOGZjZDBkZTZkZWIyMDVkYzBmMzkyZTQ5NWUyMTBhOGYxZjVmMzMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.TV0W3jWUahbIdWaPAIHVCNZnZZK9LBn0E90h6bW0REU)

#### ETH

[](#eth)

[![eth](https://private-user-images.githubusercontent.com/31046817/243049936-41ca0d2f-e120-4733-a96b-ff7a34e1e4de.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvb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zMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzAyVDE0MDQwOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM1YjE0ODg0YTJhYmQyYTQxYjU0OTIxNjM0ZTkwZTAxZjZkNzFlY2U2NmE2MGI3MjdjYjk0ZjM4YmVjYzRkOTEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.1FN38dqCUPgTu_gO2Xb2jQik9skM5jdKtU1kMFzW3do)

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information about recent changes.

### Testing

[](#testing)

```
composer test
```

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

[](#contributing)

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

### Security

[](#security)

If you discover any security-related issues, please email  instead of using the issue tracker. Please do not email any questions, open an issue if you have a question.

Credits
-------

[](#credits)

- [Jonas Schen](https://github.com/jonasschen)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance67

Regular maintenance activity

Popularity27

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity67

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 ~122 days

Recently: every ~110 days

Total

8

Last Release

270d ago

Major Versions

v1.1.0 → v2.0.12024-07-19

v2.2.1 → v3.0.32025-09-23

v3.0.3 → v4.0.02025-10-06

PHP version history (3 changes)v1.0.0PHP ^8.0

v1.1.0PHP ^8.2

v2.2.1PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/726e9421b6682d1730e00fb93929d3b2158a3e025d871a92fcb8641e2ffa8d02?d=identicon)[jonasschen](/maintainers/jonasschen)

---

Top Contributors

[![jonasschen](https://avatars.githubusercontent.com/u/31046817?v=4)](https://github.com/jonasschen "jonasschen (22 commits)")

---

Tags

i18nlaravelphptranslationi18nlanguagetranslationlangLaravel-langjonasschenlaravel-lang-monitorlang-monitor

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jonasschen-laravel-lang-monitor/health.svg)

```
[![Health](https://phpackages.com/badges/jonasschen-laravel-lang-monitor/health.svg)](https://phpackages.com/packages/jonasschen-laravel-lang-monitor)
```

###  Alternatives

[laravel-lang/common

Easily connect the necessary language packs to the application

1593.8M34](/packages/laravel-lang-common)[aplus/language

Aplus Framework Language Library

2391.7M15](/packages/aplus-language)[inpsyde/multilingual-press

Simply THE multisite-based free open source plugin for your multilingual websites.

2414.0k1](/packages/inpsyde-multilingual-press)[tractorcow/silverstripe-fluent

Simple localisation for Silverstripe

91437.9k29](/packages/tractorcow-silverstripe-fluent)[laravel-lang/locale-list

List of localizations available in Laravel Lang projects

105.6M16](/packages/laravel-lang-locale-list)[badinansoft/nova-language-switch

A Laravel Nova package to switch language in your application

26611.2k1](/packages/badinansoft-nova-language-switch)

PHPackages © 2026

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