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

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

anezi/preferred-locale
======================

Automatic selection of user's preferred locale

03PHP

Since Dec 8Pushed 7y ago1 watchersCompare

[ Source](https://github.com/anezi/preferred-locale)[ Packagist](https://packagist.org/packages/anezi/preferred-locale)[ RSS](/packages/anezi-preferred-locale/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![Build Status](https://camo.githubusercontent.com/25f1a24e5bb43efc6a8cf4d586221f83ee3d617f0497189ae40b3851b342e253/68747470733a2f2f7472617669732d63692e636f6d2f616e657a692f7072656665727265642d6c6f63616c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/anezi/preferred-locale)[![codecov](https://camo.githubusercontent.com/b400ffc89de2c1e7147dc571aad137995d3598fef1f0be39e14a04d0c9736ecb/68747470733a2f2f636f6465636f762e696f2f67682f616e657a692f7072656665727265642d6c6f63616c652f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/anezi/preferred-locale)

Preferred locale event subscriber for Symfony projects.
=======================================================

[](#preferred-locale-event-subscriber-for-symfony-projects)

Features:

- If the locale is not defined in the URL that the subscriber checks in the session, otherwise it checks the browser languages.
- The locale is displayed in the URL in lowercase and using a hyphen.
- It converts the locale displayed in the URL into Symfony-compatible locale.

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/8da2a4376a9b330628e63e6d5b11ab407c17549b955b65adc19ca49b914e5fae?d=identicon)[amouhzi](/maintainers/amouhzi)

---

Top Contributors

[![amouhzi](https://avatars.githubusercontent.com/u/4458806?v=4)](https://github.com/amouhzi "amouhzi (12 commits)")

---

Tags

localephpphp71symfony-component

### Embed Badge

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

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

###  Alternatives

[smmoosavi/php-gettext

Wrapper for php-gettext by danilo segan. This library provides PHP functions to read MO files even when gettext is not compiled in or when appropriate locale is not present on the system.

1926.6k1](/packages/smmoosavi-php-gettext)[laradevs/spanish

labels translated to spanish

166.7k](/packages/laradevs-spanish)

PHPackages © 2026

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