whitecube/lingua
Lingua adds a translation management UI to Laravel: browse and edit PHP and JSON language files in one place, spot missing keys, and keep every locale in sync without hand-editing files. It installs quickly and slots into existing localization workflows.
Architecture fit
whitecube/lingua is a stateless, dependency-light utility library that converts language identifiers between formats (ISO 639-1 two-letter, ISO 639-2/B and /T three-letter, ISO 639-3, and human-readable names). This is a pure domain concern, not infrastructure, so it slots naturally into a Laravel service layer or a small adapter class behind an interface.Accept-Language headers, and reconciling codes during CSV/API imports.Integration feasibility
AppServiceProvider is trivial.composer.json, confirm PSR-4 autoloading, confirm whether the language tables cover ISO 639-3 fully (~7,800 entries) or only a curated subset, and confirm behavior for unmapped/ambiguous inputs (null vs. exception vs. silent fallback).Technical risk
^7.x Composer constraint and PHP-8 deprecations. Unverified compatibility with current Laravel/PHP versions is the single most likely blocker.und/mul/zxx sentinels are common. Silent or lossy fallbacks are the dangerous failure mode.Key questions
--ignore-platform-reqs?symfony/intl, umpirsky/language-list) that would make this package redundant?Stack fit
App\Support\Language\LanguageCodeConverter — that maps domain concepts to the library's API. Business code should never call the package directly.symfony/intl is already transitively present (common in Laravel via other packages), evaluate whether it covers the same need before adding a second source of truth for language data.Migration path
convert(string $code, string $to): string), so the vendor can be swapped for a fork, an internal table, or symfony/intl without touching call sites.App\Vendor\Lingua) with the data tables preserved — the value of this package is the mapping data, not the code volume.symfony/intl (region/language names), umpirsky/language-list (comprehensive code lists), or a generated static map from CLDR/ISO sources.Compatibility
composer.json (no ^), commit composer.lock, and mirror the package source into internal VCS or a private Composer repository to remove the "unknown repository" exposure.Sequencing
und, mul, deprecated codes, bibliographic/terminological pairs).Maintenance
Support
Scaling
Failure modes
en-US vs en-us, trailing spaces from CSV imports; normalize at the boundary, not inside the library call.Ramp-up
Overall recommendation
Conditional adoption. The capability is genuinely useful and cheap to integrate, but the maintenance, provenance, and PHP-8 compatibility profile make direct, unwrapped usage unacceptable. Proceed only with: strict version pinning, an internal interface wrapper, a mirrored source, a mandatory compatibility spike, and a documented fork/replace exit. If the compatibility spike fails or the language table is materially incomplete, decline and implement the mapping internally or via symfony/intl — the effort is comparable to the mitigation work this package already requires.
How can I help you explore Laravel packages today?