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

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

ricardokovalski/locale
======================

A simple PHP Locale Value Object

v1.0.1(4y ago)01152MITPHPPHP &gt;=5.6

Since Aug 5Pushed 4y ago1 watchersCompare

[ Source](https://github.com/ricardokovalski/locale)[ Packagist](https://packagist.org/packages/ricardokovalski/locale)[ RSS](/packages/ricardokovalski-locale/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (2)Versions (5)Used By (2)

ricardokovalski/locale
======================

[](#ricardokovalskilocale)

 **Um simples objeto de valor representando o Locale.**

 [![Source Code](https://camo.githubusercontent.com/949a32b0216137f60fd643d2cc9d8126c1bd28273073df2bffe713499d543fc5/687474703a2f2f696d672e736869656c64732e696f2f62616467652f736f757263652d7269636172646f6b6f76616c736b692f6c6f63616c652d626c75652e737667)](https://github.com/ricardokovalski/locale) [![PHP Programming Language](https://camo.githubusercontent.com/cab1c40991c77e8b5c990f35e62a75ab8e5e5c5c8feeb6b15c348403e218616b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d2533453d352e362d3737376262332e737667)](https://php.net) [![Source Code](https://camo.githubusercontent.com/9b7664918c8d0bc80e6b9aafd1c432d6baf5bea89d6fa05d76432fcb7a8f8ea8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f7269636172646f6b6f76616c736b692f6c6f63616c652e737667)](https://github.com/ricardokovalski/locale/releases) [![Author](https://camo.githubusercontent.com/13ee1d4743665be497ac24068eef02fea52c9a2ad0e8855cea8805d534ff5dad/687474703a2f2f696d672e736869656c64732e696f2f62616467652f617574686f722d407269636172646f6b6f76616c736b692d626c75652e737667)](https://github.com/ricardokovalski) [![Read License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](https://github.com/ricardokovalski/locale/blob/main/LICENSE)

Sobre
-----

[](#sobre)

ricardokovalski/locale é um simples objeto de valor desenvolvido em PHP para representar o Locale.

Instalação
----------

[](#instalação)

Instale este pacote como uma dependência usando [Composer](https://getcomposer.org).

```
composer require ricardokovalski/locale
```

Uso básico
----------

[](#uso-básico)

```
use RicardoKovalski\Locale\Locale;

Locale::fromString('en_US');
```

### Formatando

[](#formatando)

```
use RicardoKovalski\Locale\Locale;

Locale::fromString('en/US')->format('%L_%c');

//EN_us
```

### Formatos permitidos

[](#formatos-permitidos)

   Character Result     c Country Code Lowercase   C Country Code Uppercase   l Language Code Lowercase   L Language Code Uppercase  Copyright and License
---------------------

[](#copyright-and-license)

The ricardokovalski/locale library is copyright © [Ricardo Kovalski](https://github.com/ricardokovalski) and licensed for use under the terms of the MIT License (MIT). Please see [LICENSE](LICENSE) for more information.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity49

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 ~0 days

Total

4

Last Release

1742d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b6f26053587d0d30779f0864360da904b5227317480dc2ee00773ca8d1b7e280?d=identicon)[ricardokovalski](/maintainers/ricardokovalski)

---

Top Contributors

[![ricardokovalski](https://avatars.githubusercontent.com/u/13839909?v=4)](https://github.com/ricardokovalski "ricardokovalski (14 commits)")

---

Tags

localevalue-objectValue Objectlocale

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

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

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

###  Alternatives

[fightbulc/moment

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

9693.2M10](/packages/fightbulc-moment)[codemix/yii2-localeurls

Automatic locale/language management for URLs.

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

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

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

Aplus Framework Language Library

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

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

124432.6k8](/packages/vanderlee-syllable)[tractorcow/silverstripe-fluent

Simple localisation for Silverstripe

92421.6k26](/packages/tractorcow-silverstripe-fluent)

PHPackages © 2026

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