potsky/laravel-localization-helpers
A set of Laravel localization helpers for building multilingual apps, with localized routes, language switching, translated URL segments, middleware, and Blade helpers to simplify locale-aware development.
lang/ files — doubles as a cheap audit. Running it (or a fork) against a legacy app produces an inventory of hardcoded strings and missing keys, which is exactly the input needed to size and prioritize an i18n epic.trans(), @lang, and Lang::get() keys and diffs them against existing lang files is a small, low-risk build with a permissive license and current-Laravel compatibility.Consider it only if:
Look elsewhere when:
laravel-lang / lang:publish for baseline lang files, IDE i18n inspections, or a small AST-based extractor plus a CI diff check.To executives: This is a 2015-era, 188-star utility that scans code for translation strings and writes the matching language files. Two facts make it a reference, not a dependency: it's GPL-3.0 (copyleft — a legal complication for anything we distribute commercially) and it hasn't shipped a release since February 2015, so it's unsupported on current Laravel. Recommendation: do not add it as a dependency. Treat it as validation that translation-key hygiene is a real, recurring cost, and fund a small internal tool (est. 1–3 engineering days) that performs the same extraction and runs in CI. That captures the benefit with a permissive license, modern compatibility, and no maintenance risk.
To engineering: The mechanism is simple and worth copying — parse views and PHP for trans(), @lang, and Lang::get(), diff against resources/lang/{locale}, and emit missing keys. If we ever revive a Laravel 4/5.0 app, forking is viable, but budget for rewriting the service provider and command registration. Prefer an AST-based extractor (e.g., nikic/php-parser) over regex for correctness, and wire the diff into CI so missing keys fail the build instead of accumulating silently.
To design/content (if applicable): This covers key scaffolding only — not copy quality, tone, or translator workflow. Any localization roadmap still needs a separate decision on translation management and pluralization strategy.
How can I help you explore Laravel packages today?