PHPackages                             zenstruck/intl - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Localization &amp; i18n](/categories/localization)
4. /
5. zenstruck/intl

AbandonedArchivedLibrary[Localization &amp; i18n](/categories/localization)

zenstruck/intl
==============

Useful helpers for easing internationalization

v1.0.1(12y ago)2164MITPHPPHP &gt;=5.3.2

Since Oct 31Pushed 12y ago1 watchersCompare

[ Source](https://github.com/kbond/intl)[ Packagist](https://packagist.org/packages/zenstruck/intl)[ RSS](/packages/zenstruck-intl/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Intl
====

[](#intl)

This library contains useful helpers for easing internationalization in a PHP application

Locale
------

[](#locale)

This component provides a complete list (including meta information) for all locales. The list is built from the  API and is contained in `resources/locales.php`.

### Usage

[](#usage)

```
// Provides the locales from the php resource
\Zenstruck\Intl\Locale::getAvailableLocales()

// Provides the locales as an assoc. array with the code as the key and name as the value
// Useful for a dropdown locale selector
\Zenstruck\Intl\Locale::getLocaleNames()

// Provides information for either the provided or default locale
\Zenstruck\Intl\Locale::getLocale('en_US')
\Zenstruck\Intl\Locale::getLocale()

// Provides only locales with both language and region set (ie "en_US", not "en")
\Zenstruck\Intl\Locale::getLocalesWithRegions()

// Provides the regions as an assoc. array with the code as the key and name as the value
\Zenstruck\Intl\Locale::getLocalesWithRegionNames()

// Provides language-only locales (ie "en", not "en_US")
\Zenstruck\Intl\Locale::getLanguages()

// Provides the languages as an assoc. array with the code as the key and name as the value
\Zenstruck\Intl\Locale::getLanguageNames()

// Provide the 3 digit ISO 4217 currency code for either the provided or default locale
\Zenstruck\Intl\Locale::getCurrency('en_US')
\Zenstruck\Intl\Locale::getCurrency()

// Provide the currency symbol for either the provided or default locale
\Zenstruck\Intl\Locale::getCurrencySymbol('en_US')
\Zenstruck\Intl\Locale::getCurrencySymbol()
```

Resources
---------

[](#resources)

The full locale list is available in the following formats:

- **PHP**: `resources/locales.php`
- **JSON**: `resources/locales.json`

Build JSON/PHP resources
------------------------

[](#build-jsonphp-resources)

```
composer install --dev

php bin/build.php

```

Run Test Suite
--------------

[](#run-test-suite)

```
composer install --dev

phpunit

```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~40 days

Total

2

Last Release

4584d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/707369cc916e0ea1aacbf077dcba464f611cef879f024d8944311a54a15224b3?d=identicon)[kbond](/maintainers/kbond)

---

Top Contributors

[![kbond](https://avatars.githubusercontent.com/u/127811?v=4)](https://github.com/kbond "kbond (6 commits)")

---

Tags

locale

### Embed Badge

![Health badge](/badges/zenstruck-intl/health.svg)

```
[![Health](https://phpackages.com/badges/zenstruck-intl/health.svg)](https://phpackages.com/packages/zenstruck-intl)
```

###  Alternatives

[fightbulc/moment

Parse, validate, manipulate, and display dates in PHP w/ i18n support. Inspired by moment.js

9683.3M12](/packages/fightbulc-moment)[codemix/yii2-localeurls

Automatic locale/language management for URLs.

4051.3M30](/packages/codemix-yii2-localeurls)[codezero/laravel-localized-routes

A convenient way to set up, manage and use localized routes in a Laravel app.

544656.8k4](/packages/codezero-laravel-localized-routes)[aplus/language

Aplus Framework Language Library

2371.7M15](/packages/aplus-language)[vanderlee/syllable

Text syllable splitting and hyphenation using Frank M. Liang's TeX algorithm.

126462.0k9](/packages/vanderlee-syllable)[tractorcow/silverstripe-fluent

Simple localisation for Silverstripe

90432.1k28](/packages/tractorcow-silverstripe-fluent)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
