torann/localization-helpers
Localization Helpers is a Laravel package that simplifies multilingual apps with locale detection, localized routes, language switching, and translation utilities. It helps manage available locales and set the active language per request.
__('checkout.new_field') to a Blade template and no base-locale key exists. This converts a class of "raw key shown to customer" defects into a build failure — a measurable quality win independent of the package's other merits.example.com/fr/... vs. subdomain vs. query parameter, and whether locale persistence lives in session or cookie. Those are product decisions with SEO and shareability consequences, and they should be made deliberately, not inherited from a helper package.lang/ files, reducing translation-file drift between releases.PM action before committing roadmap: the supplied material contains two incompatible readings of this package — a runtime localization helper (middleware, locale-aware routing: production surface, needs an ADR) versus a dev-time Artisan command suite (zero production footprint). Treat the discrepancy as a documentation-quality signal and require a 30-minute verification spike (composer show, php artisan list, read src/) before any roadmap item depends on it.
Consider it when:
lang/ or resources/lang/), not JSON-only, database-backed, or CMS-managed strings.Look elsewhere when:
Adoption criteria if you proceed: install as require-dev, pin exact, run read-only drift detection in CI first, prove lossless round-trip on one real locale (including a non-Latin script and a pluralized string), and only then allow write operations behind human PR review. Assign a named owner and budget a fork as a contingency — the small surface makes a fork days, not weeks, which is the main argument for trying it.
For executives: This is a low-cost developer productivity utility for Laravel localization workflows. It addresses a specific, recurring release risk — translation keys missing or out of sync across locales, which surfaces as raw placeholder text in customer-facing UI. It is not customer-facing, carries a permissive BSD-2-Clause license with minimal legal exposure, and if installed as a dev dependency adds no production runtime surface. Adoption is very low (8 stars, 0 dependent projects, single maintainer), so the recommendation is a time-boxed pilot with a named owner and an explicit abandon criterion, not immediate standardization. Expected cost is low single-digit engineering days including governance; the realistic outcome is deferring a TMS purchase by two to three quarters while the locale count stays in single digits. Note one open item: the package's description and its release history imply different capabilities, so scope confirmation precedes any commitment.
For engineering: Evaluate on a branch as a require-dev dependency with an exact version pin. First resolve which package this actually is — runtime locale helpers (middleware, route generation; production surface, needs middleware-ordering review and an ADR) or Artisan tooling for key scanning and file sync (zero production footprint). Read src/ and php artisan list, not the README; with this adoption level the code is the documentation. Then start at the lowest-risk, highest-value point: a read-only missing-key drift check in CI (git diff --exit-code lang/ if no dry-run flag exists), which delivers most of the benefit at zero write risk. Validate the oldest Laravel version in the fleet, not just the newest; confirm it honors a non-default lang path and package namespaces; and treat silent skipping of unrecognized key shapes (dynamic keys, pluralization pipes, :placeholder handling, vendor namespaces) as a defect rather than a limitation. Any command that rewrites lang/ is destructive against assets with almost no test coverage — gate every mutation behind reviewed pull requests, never run writes on a protected branch, and keep Git as the rollback mechanism.
How can I help you explore Laravel packages today?