PHPackages                             syntaxas/laravel-lang-checker - 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. syntaxas/laravel-lang-checker

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

syntaxas/laravel-lang-checker
=============================

Laravel package for checking language files and translations.

1.0.0(1mo ago)01MITPHPPHP ^8.2CI passing

Since Jul 5Pushed 1mo agoCompare

[ Source](https://github.com/syntaxas/laravel-lang-checker)[ Packagist](https://packagist.org/packages/syntaxas/laravel-lang-checker)[ Docs](https://github.com/syntaxas/laravel-lang-checker)[ RSS](/packages/syntaxas-laravel-lang-checker/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (12)Versions (3)Used By (0)

Laravel Lang Checker
====================

[](#laravel-lang-checker)

[![Latest Version on Packagist](https://camo.githubusercontent.com/2b2ad3435f67216687c1850c6cec21c6a116e203a82e46e69a148d214e66a06a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73796e74617861732f6c61726176656c2d6c616e672d636865636b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/syntaxas/laravel-lang-checker)[![GitHub Tests Action Status](https://github.com/syntaxas/laravel-lang-checker/actions/workflows/run-tests.yml/badge.svg)](https://github.com/syntaxas/laravel-lang-checker/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://github.com/syntaxas/laravel-lang-checker/actions/workflows/fix-php-code-style-issues.yml/badge.svg)](https://github.com/syntaxas/laravel-lang-checker/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/ccea9a0544da3001a718ac14311c73da2afef77576d6e21a0215e97e4dd6162b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73796e74617861732f6c61726176656c2d6c616e672d636865636b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/syntaxas/laravel-lang-checker)

Laravel Lang Checker is a package for checking language files and translations in Laravel applications. It helps ensure that your translations are complete and consistent across different languages.

Requirements
------------

[](#requirements)

- PHP **8.2**, **8.3**, **8.4**, or **8.5**
- Laravel **11**, **12**, or **13**

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

[](#installation)

You can install the package via composer:

```
composer require syntaxas/laravel-lang-checker
```

Usage
-----

[](#usage)

```
php artisan laravel-language:check
```

What It Checks
--------------

[](#what-it-checks)

The command scans all locale directories under your `lang/` path and runs the following checks:

CheckOutcome`lang/` directory does not exist❌ FailsNo locale subdirectories found⚠️ Warning, passesA translation file exists in some locales but not all❌ FailsA translation key exists in some locales but not all❌ FailsA key is an array in one locale but a scalar value in another❌ FailsA translation file does not return an array❌ FailsA translation value is an empty string⚠️ Warning, passesChecks work recursively — files in subdirectories (e.g. `/lang/lt/admin/dashboard.php`) are included.

When the command fails, it reports the total number of issues found:

```
[ERROR] Language files check failed with 3 issue(s).

```

When everything is consistent:

```
[OK] Language files are consistent across all locales.

```

Examples
--------

[](#examples)

### Missing translation key

[](#missing-translation-key)

`lang/en/messages.php`

```
return [
    'welcome' => 'Welcome',
    'goodbye' => 'Goodbye', // present in EN
];
```

`lang/lt/messages.php`

```
return [
    'welcome' => 'Sveiki',
    // 'goodbye' is missing
];
```

```
[ERROR] LT locale missing goodbye translation in messages.php

```

---

### Missing file

[](#missing-file)

`lang/en/auth.php` — exists
`lang/lt/auth.php` — missing

```
[ERROR] Missing file for locale LT: auth.php

```

---

### Type mismatch

[](#type-mismatch)

`lang/en/messages.php`

```
return [
    'nav' => [
        'home'  => 'Home',
        'about' => 'About',
    ],
];
```

`lang/lt/messages.php`

```
return [
    'nav' => 'Navigacija', // scalar instead of array
];
```

```
[ERROR] Type mismatch for key nav in messages.php (EN=array, LT=value)

```

---

### Empty translation

[](#empty-translation)

`lang/en/messages.php`

```
return [
    'welcome' => '', // empty string
];
```

```
[WARNING] Empty translation in messages.php (EN): welcome

```

---

### All correct

[](#all-correct)

`lang/en/messages.php`

```
return [
    'welcome' => 'Welcome',
    'goodbye' => 'Goodbye',
];
```

`lang/lt/messages.php`

```
return [
    'welcome' => 'Sveiki',
    'goodbye' => 'Viso gero',
];
```

```
[OK] Language files are consistent across all locales.

```

Testing
-------

[](#testing)

```
composer test
```

License
-------

[](#license)

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

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance90

Actively maintained with recent releases

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

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

Total

2

Last Release

48d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/28758219?v=4)[A](/maintainers/dreftas)[@dreftas](https://github.com/dreftas)

---

Top Contributors

[![dreftas](https://avatars.githubusercontent.com/u/28758219?v=4)](https://github.com/dreftas "dreftas (9 commits)")

---

Tags

laravelsyntaxdigitalislaravel-lang-checker

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/syntaxas-laravel-lang-checker/health.svg)

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

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

13.0k107.5M1.6k](/packages/spatie-laravel-permission)[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.2k12.6M142](/packages/dedoc-scramble)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3915.5k](/packages/rawilk-profile-filament-plugin)[elegantly/laravel-translator

All on one translations management for Laravel

6339.5k](/packages/elegantly-laravel-translator)[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

46273.9k](/packages/harris21-laravel-fuse)[vormkracht10/laravel-mails

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

25060.1k](/packages/vormkracht10-laravel-mails)

PHPackages © 2026

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