ozankurt/laravel-intl
A Laravel package for internationalization built on PHP's intl extension, providing locale-aware helpers for formatting dates, numbers, and currencies, along with middleware and Blade directives to manage per-request locales in your application.
NumberFormatter/IntlDateFormatter in our own class, or vendor a 200-line facade?" Because the package is thin, we can adopt it today and replace it internally in a day if maintenance stalls. That makes it a low-consequence decision — treat it as a utility dependency, not an architectural commitment.Adopt when:
NumberFormatter boilerplate or string-concatenating symbols.ext-intl is reliably present across local, CI, and production — and you can pin the same base image everywhere so ICU output is consistent.Intl::currency(1234.56, 'EUR', 'de-DE')) with per-call locale overrides, rather than threading a formatter config everywhere.Formatter service — which you should do regardless, for testability and to keep an exit ramp open.Look elsewhere when:
Risk posture: MIT, no transitive risk, tiny surface area. The correct mitigation is not a procurement review — it's (a) pinning the dependency, (b) wrapping it, and (c) accepting that forking or inlining it later is a small, bounded task.
To executives: We can make prices, dates, and percentages look native in every market we sell into for roughly a day of integration work, using a permissively licensed, well-understood helper. Better localized pricing display is a direct trust-and-conversion lever in EU, LATAM, and APAC. The dependency risk is minimal and reversible: MIT license, no lock-in, and the code we'd replace it with is small enough to own ourselves if the maintainer steps away. This is a low-cost enabler, not a platform bet.
To engineering: This is a thin fluent facade over PHP's intl extension — NumberFormatter and IntlDateFormatter with sane defaults and per-call locale overrides. Recommended usage: adopt it, but always call it through our own Formatter interface so tests can fake locale output and we keep one seam to swap. Non-negotiables for integration: ext-intl present in the Dockerfile and CI image; identical base image across dev/CI/prod for ICU parity; assert on structure (symbol present, digits grouped) rather than exact strings in tests; validate user-supplied locale and currency codes against a whitelist, since bad codes silently fall back instead of throwing; remember config:cache freezes published defaults and Octane needs octane:reload after upgrades. Before bumping to 2.1.0, run composer update ... --dry-run and diff 2.0.0..2.1.0 in vendor/, since there's no written changelog and a minor bump can still change defaults.
How can I help you explore Laravel packages today?