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.
composer require potsky/laravel-localization-helpers resolves cleanly against a modern Laravel. Pin the version, install on a branch, and confirm your PHP constraint accepts it.config/app.php:'providers' => [
Potsky\LocalizationHelpers\LocalizationHelpersServiceProvider::class,
],
php artisan list (or php artisan list localization) to see the actual command names and flags shipped in the version you installed.php artisan vendor:publish — scan paths and file extensions usually live there.lang/ diff with git diff. That single run tells you more about the parser's behavior on your codebase than any docs will: which @lang/trans() calls it catches, how it nests keys, and what it writes into files.@lang() / trans() calls, run the missing-key scan, review the diff, and commit it alongside the feature. This keeps lang files from drifting as features land.git diff --exit-code after running, or a dry-run flag if your version supports one). This makes "you forgot the translation" a PR-time failure rather than a production bug.resources/views, app/Http, and your own packages. Exclude vendor/, compiled Blade caches, and generated files, or you'll get noise plus slow runs.en), then propagate keys to other locales with your own script. Auto-generating into every locale produces forests of placeholder translations that hide real gaps.trans('validation.' . $rule), enum-driven keys, or translations consumed by JavaScript, keep a manual allow-list or a wrapper call the parser can see. Otherwise they get flagged as obsolete and deleted.__() with dynamic arguments, JS-side translations) and false positives (keys only referenced from config or tests)._one, _many), validation attribute names, and package-published vendor lang files are easy to misclassify. Review every deletion.-v path, and check storage/logs/laravel.log for parse errors. If it finds nothing at all, it's almost always misconfiguration, not a broken parser.app/Console/Kernel.php — useful for adding a dry-run mode, custom key formats, or JSON output for CI.laravel-lang/lang plus a small custom extractor command (e.g. built on nikic/php-parser) is usually less risky than reviving a decade-old package — you get the same "find missing keys" workflow without the compatibility and licensing baggage.How can I help you explore Laravel packages today?