themsaid/laravel-langman
Laravel Langman is an Artisan console tool for managing Laravel translation files. It scans your app for missing translation keys, lists existing ones, and lets you add new translations interactively from the terminal—no more hand-editing lang files.
What it is: themsaid/laravel-langman is a developer-facing Artisan toolkit for Laravel translation files. It scans application source (views/controllers) for __(), @lang, and trans() calls and reconciles them against resources/lang/* — surfacing missing keys, orphaned keys, and allowing append/find/show operations. It ships no runtime code path, no middleware, no service provider work at request time.
Architecture fit: Narrow but real. It addresses a genuine workflow gap in Laravel i18n: keys are plain PHP arrays with no schema, so drift between code and lang files is silent and only caught at runtime (missing key returns the raw key string). For a product with heavy Blade usage and multiple locales, the problem fits. The package fits only Laravel 5.x-era applications — the illuminate/support constraint and 2017 codebase will not resolve against modern Laravel without modification.
Integration feasibility: Medium-low.
Technical risk:
__('status.' . $code)), pluralization, and JSON translation files are the classic miss/false-positive cases.Key questions for the team:
Stack fit: Only appropriate for a legacy Laravel 5.x service that is not on the immediate upgrade path. For any Laravel 8+ codebase, treat the repository as a design reference, not a package.
Migration path (recommended):
require-dev only if the version constraint resolves; otherwise vendor the source into a tools/ or internal package namespace.illuminate/contracts for the target Laravel major, replace any deprecated helpers, add a test suite around the scanner. Expect 2–4 engineer-days.nikic/php-parser for Blade/PHP extraction. This is the cleaner long-term option if the fork drifts.Compatibility: Expect breakage on PHP 8 (reserved words, typing, string offset behavior) and on Laravel's move to lang/ at the project root and JSON translation files. The scanner's regex assumptions about resources/lang layout will need updating. Blade compilation changes (component syntax, @lang directives) also affect extraction accuracy.
Sequencing:
Alternatives to evaluate in the same pass: barryvdh/laravel-translation-manager (web UI, actively maintained), kkomelin/laravel-translatable-string-exporter (extraction-first, modern Laravel), or a commercial TMS if multiple locales and external translators are involved.
Maintenance: The dominant cost. Zero upstream cadence means every Laravel/PHP upgrade becomes an internal ticket. Assign a named owner; without one, the tool silently rots and developers stop trusting its output — the worst outcome, because a stale scanner produces false confidence. Budget ~1–2 engineer-days per framework major.
Support: Community-only, and the community has moved on. No maintainer response path, no issue triage, no advisories. Internal documentation and a short runbook are mandatory if adopted.
Scaling: Negligible runtime concern — it runs at build/commit time and lang files are small. The real scaling limit is organizational: as locales multiply, key naming conventions and review ownership matter far more than the tool. Watch for git churn on large lang files and merge conflicts when multiple teams edit translations in parallel; splitting lang files per domain mitigates this.
Failure modes to instrument:
Ramp-up: Very low. Artisan commands, self-documenting, a developer is productive in under a day. The cost is not learning the tool; it is the ongoing ownership tax and the credibility risk if output is unreliable.
TPM recommendation: Do not adopt as a dependency. Use it to frame the problem, run a one-week read-only pilot to quantify translation drift, and fund either a hardened internal fork or a reimplementation of the two commands that matter — scoped to ~1 engineer-week, with CI enforcement as the actual deliverable. The value here is the pattern, not the package.
How can I help you explore Laravel packages today?