PHPackages                             fidum/laravel-translation-linter - 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. fidum/laravel-translation-linter

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

fidum/laravel-translation-linter
================================

Commands to help you keep your laravel translations organized.

3.0.0(1y ago)2476.3k↑67.2%[4 PRs](https://github.com/fidum/laravel-translation-linter/pulls)MITPHPPHP ^8.2CI passing

Since Oct 6Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/fidum/laravel-translation-linter)[ Packagist](https://packagist.org/packages/fidum/laravel-translation-linter)[ Docs](https://github.com/fidum/laravel-translation-linter)[ GitHub Sponsors](https://github.com/dmason30)[ RSS](/packages/fidum-laravel-translation-linter/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (12)Versions (17)Used By (0)

Laravel Translation Linter
==========================

[](#laravel-translation-linter)

[![Latest Version on Packagist](https://camo.githubusercontent.com/95a68613f2e0169c883d3e2b23a5e65bb9db027266ad1dfdb7dd66e630ad1f2c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f666964756d2f6c61726176656c2d7472616e736c6174696f6e2d6c696e7465722e7376673f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/fidum/laravel-translation-linter)[![GitHub Tests Action Status](https://camo.githubusercontent.com/d0bab8851103a9d5da242d94db0fa915691db70975a57a44c01d209bc3a29328/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f666964756d2f6c61726176656c2d7472616e736c6174696f6e2d6c696e7465722f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666f722d7468652d6261646765)](https://github.com/fidum/laravel-translation-linter/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/3d3d866aec04a6ea0810ffcd2ddc6804a3c3db1bbfa7aa9df798df743101a9d8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f666964756d2f6c61726176656c2d7472616e736c6174696f6e2d6c696e7465722f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666f722d7468652d6261646765)](https://github.com/fidum/laravel-translation-linter/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Twitter Follow](https://camo.githubusercontent.com/3ecd70148f9f16e2e0d66fcde3428926f1df4d6797ea463473ccf60dcdf7758a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f666f6c6c6f772d25343064616e6d61736f6e6d702d3144413146323f6c6f676f3d74776974746572267374796c653d666f722d7468652d6261646765)](https://twitter.com/danmasonmp)

This package provides commands to help you keep your translations organized.

Shoutout to Hexadog for their package [laravel-translation-manager](https://github.com/hexadog/laravel-translation-manager)which was used as the foundation for this package.

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

[](#installation)

You can install the package via composer:

```
composer require --dev fidum/laravel-translation-linter
```

You can publish the config file with:

```
php artisan vendor:publish --tag="translation-linter-config"
```

[Click here to see the contents of the config file](config/translation-linter.php).

You should read through the config, which serves as additional documentation and make changes as needed.

Missing Command
---------------

[](#missing-command)

This reads through all your code and finds all your language function usage. Then attempts to find matches in your language files and will output any keys in your code that do not exist as a language key.

```
$ php artisan translation:missing

   ERROR  3 missing translations found.

+--------+--------------------------------+---------------------+
| Locale | Key                            | File                |
+--------+--------------------------------+---------------------+
| en     | Missing PHP Class              | app/ExampleJson.php |
| en     | Only Missing English PHP Class | app/ExampleJson.php |
| de     | Missing PHP Class              | app/ExampleJson.php |
+--------+--------------------------------+---------------------+
```

You can generate a baseline file which will be used to ignore specific keys with the `--generate-baseline` or `-b` command options:

```
$ php artisan translation:missing --generate-baseline

   INFO  Baseline file written with 49 translation keys.

$ php artisan translation:missing

   INFO  No missing translations found!
```

Unused Command
--------------

[](#unused-command)

This reads through all your code and finds all your language function usage. Then attempts to find matches in your language files and will output any language keys that are not being used in your code.

**Note:** Some language keys are filtered out by default, you can change the filters used in the [config file](config/translation-linter.php).

```
$ php artisan translation:unused

   ERROR  5 unused translations found.

+--------+----------------------+-----------------------------------------------+
| Locale | Key                  | Value                                         |
+--------+----------------------+-----------------------------------------------+
| en     | Unused PHP Class     | I am unused in php class                      |
| en     | Unused Blade File    | I am unused in blade                          |
| en     | Unused Vue Component | I am unused in vue component                  |
| en     | example.unused       | I am unused in php class                      |
| de     | example.unused       | Ich werde in einer PHP-Klasse nicht verwendet |
+--------+----------------------+-----------------------------------------------+
```

You can generate a baseline file which will be used to ignore specific keys with the `--generate-baseline` or `-b` command options:

```
$ php artisan translation:unused --generate-baseline

   INFO  Baseline file written with 5 unused translation keys.

$ php artisan translation:unused

   INFO  No unused translations found!
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

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

[](#contributing)

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

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Dan Mason](https://github.com/fidum)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance69

Regular maintenance activity

Popularity40

Moderate usage in the ecosystem

Community10

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 73.5% 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 ~42 days

Recently: every ~115 days

Total

13

Last Release

448d ago

Major Versions

1.x-dev → 2.0.02023-11-23

2.0.3 → 3.0.02025-02-24

### Community

Maintainers

![](https://www.gravatar.com/avatar/ce00db7f776e4eedafb4c929c8996ce27544888a84fbe2a210f32f0eb38aa794?d=identicon)[dmason30](/maintainers/dmason30)

---

Top Contributors

[![dmason30](https://avatars.githubusercontent.com/u/20278756?v=4)](https://github.com/dmason30 "dmason30 (72 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (16 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (10 commits)")

---

Tags

laravellaravel-langlaravel-packagelinterlocalizationlaravelfidumlaravel-translation-linter

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/fidum-laravel-translation-linter/health.svg)

```
[![Health](https://phpackages.com/badges/fidum-laravel-translation-linter/health.svg)](https://phpackages.com/packages/fidum-laravel-translation-linter)
```

###  Alternatives

[askdkc/breezejp

Laravel Starter Kit (Livewire+Breeze+Laravel UI+Jetstream)や標準のバリデーションメッセージを全て一瞬で日本語化し、言語切替機能も提供するパッケージです / This package provides all-in-one Japanese translation for Laravel StarterKit (Livewire StarterKit, Breeze, Laravel UI and Jetstream) packages and validation messages with language switching feature.

590244.8k1](/packages/askdkc-breezejp)[statikbe/laravel-filament-chained-translation-manager

A translation manager tool for Laravel Filament, that makes use of the Laravel Chained Translator.

92108.7k](/packages/statikbe-laravel-filament-chained-translation-manager)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[elegantly/laravel-translator

All on one translations management for Laravel

6216.9k](/packages/elegantly-laravel-translator)[andrewdwallo/transmatic

Automate and streamline real-time text translations in your Laravel applications

5511.6k](/packages/andrewdwallo-transmatic)[smousss/laravel-globalize

Make Laravel projects translatable in a matter of seconds!

2266.3k](/packages/smousss-laravel-globalize)

PHPackages © 2026

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