PHPackages                             neophp/locale-package - 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. neophp/locale-package

ActiveLibrary

neophp/locale-package
=====================

Static country and currency data with formatting helpers for NeoPHP

v1.0.1(yesterday)02↑2900%MITPHPPHP &gt;=8.5CI passing

Since Aug 8Pushed yesterdayCompare

[ Source](https://github.com/NeoPHP-Dev/neo-locale-package)[ Packagist](https://packagist.org/packages/neophp/locale-package)[ RSS](/packages/neophp-locale-package/feed)WikiDiscussions main Synced today

READMEChangelog (1)DependenciesVersions (3)Used By (0)

Locale Package
==============

[](#locale-package)

Static country and currency reference data for NeoPHP, with a currency formatting Twig filter. No external API, no network dependency.

---

Structure
---------

[](#structure)

```
locale-package/
├── composer.json
├── README.md
└── src/
    ├── NeoLocalePackage.php
    ├── Data/
    │   ├── CountryList.php
    │   └── CurrencyList.php
    ├── Service/
    │   ├── CountryProvider.php
    │   └── CurrencyFormatter.php
    └── Extension/
        └── LocaleViewExtension.php

```

---

How it works
------------

[](#how-it-works)

`CountryList` and `CurrencyList` are static datasets (~29 countries, ~19 currencies) — a curated starting set, not the full ISO 3166-1/4217 lists. `CountryProvider` and `CurrencyFormatter` expose them through simple services, and `LocaleViewExtension` makes them available directly in Twig as `countries()`, `currencies()`, and a `format_currency` filter.

No IP-based country detection and no live currency conversion — this package only provides reference data and formatting, nothing that requires a network call.

---

Installation
------------

[](#installation)

### Published (Packagist)

[](#published-packagist)

```
composer require neophp/locale-package
```

### Via `package:require`

[](#via-packagerequire)

```
php bin/neo package:require neophp/locale-package --project=MyProject
```

### Local development (path repository)

[](#local-development-path-repository)

Root `composer.json` of the NeoPHP framework:

```
{
    "repositories": [
        { "type": "path", "url": "packages/locale-package" }
    ]
}
```

Target project's `composer.json`:

```
{
    "require": {
        "neophp/locale-package": "@dev"
    }
}
```

```
composer update
```

---

Enabling the package
--------------------

[](#enabling-the-package)

```
// src/MyProject/Config/app.config.php
return [
    // ...
    'packages' => [
        \Vendor\NeoPHP\LocalePackage\NeoLocalePackage::class,
    ],
];
```

No configuration file — there is nothing to customize per project.

---

Usage
-----

[](#usage)

### Country select

[](#country-select)

```

    {% for code, country in countries() %}
        {{ country.name }}
    {% endfor %}

```

### Currency select

[](#currency-select)

```

    {% for code, currency in currencies() %}
        {{ currency.name }} ({{ currency.symbol }})
    {% endfor %}

```

### Formatting a price

[](#formatting-a-price)

```
{{ 1234.5|format_currency('EUR', 'fr') }}
{# → 1 234,50 € #}

{{ 99.9|format_currency('USD') }}
{# → $99.90 #}
```

### In PHP

[](#in-php)

```
use Vendor\NeoPHP\LocalePackage\Service\CountryProvider;
use Vendor\NeoPHP\LocalePackage\Service\CurrencyFormatter;

$countryProvider->find('FR');
// ['name' => 'France', 'dialCode' => '+33', 'currency' => 'EUR']

$currencyFormatter->format(1234.5, 'EUR', 'fr'); // '1 234,50 €'
```

---

License
-------

[](#license)

MIT

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance100

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90% 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 ~0 days

Total

2

Last Release

1d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/212323688?v=4)[BBoezio](/maintainers/BenjiLeLoustik)[@BenjiLeLoustik](https://github.com/BenjiLeLoustik)

---

Top Contributors

[![BenjiLeLoustik](https://avatars.githubusercontent.com/u/212323688?v=4)](https://github.com/BenjiLeLoustik "BenjiLeLoustik (9 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

### Embed Badge

![Health badge](/badges/neophp-locale-package/health.svg)

```
[![Health](https://phpackages.com/badges/neophp-locale-package/health.svg)](https://phpackages.com/packages/neophp-locale-package)
```

PHPackages © 2026

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