Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Intl Laravel Package

commerceguys/intl

commerceguys/intl is a PHP internationalization library that provides country, currency, language, and locale data with locale-aware formatters. It helps commerce and multilingual apps display consistent, CLDR-based names and currency values.

Deep Wiki
Context7

A PHP internationalization library, powered by CLDR data.

Frequently asked questions about Intl
How do I install commerceguys/intl in a Laravel application?
Install it with Composer using composer require commerceguys/intl. The package is framework-agnostic and does not ship a Laravel service provider or publishable config. Confirm that the PHP intl extension is enabled in your local, CI, queue, and production environments.
Does commerceguys/intl support Laravel 10, 11, and 12?
The package itself is framework-agnostic and does not declare Laravel-specific constraints, so Laravel 10, 11, and 12 can use it when PHP and extension requirements are met. The assessment notes alignment with Laravel 10/11/12 on PHP 8.1+, but you should still verify the package's Composer platform constraints. Pin the Composer version and lock file before relying on it.
Do I need a service provider or config file to use commerceguys/intl with Laravel?
No, commerceguys/intl does not ship an auto-discovered Laravel provider, facade, or config file. You can optionally add a small application service provider to register repositories as singletons and expose a config map for default locale and currency. Keep that wrapper thin so controllers and Blade templates are not coupled directly to vendor classes.
What is commerceguys/intl used for in an e-commerce Laravel app?
It provides CLDR-backed repositories and value objects for currencies, countries, languages, and locales. In an e-commerce Laravel app it is useful for locale-aware currency and number formatting, ISO code lookup, and validation. It is used by Drupal Commerce and similar tools. It is not a complete i18n solution and does not replace Laravel translation, pluralization, or money math.
How do I format currency amounts with locale-aware symbols in Laravel using commerceguys/intl?
Use the package's currency repository to resolve the currency and its formatter, then pass both the currency code and locale when formatting. Always format currency and locale together because symbols such as $ and kr are ambiguous across currencies. Put the formatting behind a Blade component or API resource so the logic is reused consistently. Remember that display formatting is separate from accounting rounding.
Does commerceguys/intl replace Laravel's translation and Number helpers?
No, it complements Laravel rather than replacing its translation, pluralization, and Number helpers. Laravel remains responsible for app translations and general number formatting, while commerceguys/intl supplies CLDR-backed country, currency, language, and locale data. A common pattern is to hide the package behind app-level interfaces such as CurrencyFormatter and CountryResolver.
Can commerceguys/intl handle money math, rounding, or tax calculations?
No, commerceguys/intl is for display formatting and internationalization data, not accounting-grade money math. It does not own rounding rules, minor-unit handling, or tax calculation. Use a money library or your domain layer for arithmetic, and store amounts as integer minor units where possible. The package can then format the resolved amount at the presentation edge.
How should I test commerceguys/intl formatting in Laravel CI?
Enable the PHP intl extension in CI and pin the package version and lock file, just as you do in production. Test a fixed basket of currencies across several locales and assert stable behavior rather than brittle exact symbols where ICU versions may differ. Also run the same checks in queue, CLI, and Docker images to catch environment drift. A small wrapper interface makes these tests easier to isolate.
Is commerceguys/intl safe for production in Laravel?
The main risks are stale CLDR data, ICU version differences between environments, and missing ext-intl in web, queue, CLI, or CI images. Currency symbols can be ambiguous unless locale and currency are always formatted together. The package has a credible Drupal Commerce lineage but a modest star count and community/MIT support without a vendor SLA. Its metadata shows a future-dated last release, so verify actual tags and Composer metadata before pinning. Assign ownership for periodic currency and country data review.
What are alternatives to commerceguys/intl for Laravel internationalization?
Alternatives depend on what you need: symfony/intl for ICU-backed internationalization, Laravel's Number and translation helpers for app-level formatting, moneyphp/money for money arithmetic, and commerceguys/addressing for address formatting and validation. commerceguys/intl is strongest when you want CLDR-backed country, currency, language, and locale data with locale-aware formatters. Many Laravel apps combine these tools behind application interfaces rather than choosing one package for everything.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource