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(3d ago)01↓100%MITPHP ^8.2

Since Jul 5Compare

[ 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 Synced today

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

40

—

FairBetter than 86% of packages

Maintenance99

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

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

3d ago

### Community

Maintainers

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

---

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-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

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

All on one translations management for Laravel

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

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

44855.7k](/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.

24857.5k](/packages/vormkracht10-laravel-mails)[osama-98/laravel-enum-translatable

A Laravel package that provides translatable enum functionality with easy-to-use methods for working with enum values and their translations

561.2k](/packages/osama-98-laravel-enum-translatable)

PHPackages © 2026

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