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 1mo 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

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

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

[symfony/translation

Provides tools to internationalize your application

6.6k836.5M2.0k](/packages/symfony-translation)[nesbot/carbon

An API extension for DateTime that supports 281 different languages.

169661.4M4.8k](/packages/nesbot-carbon)[joedixon/laravel-translation

A tool for managing all of your Laravel translations

717911.4k11](/packages/joedixon-laravel-translation)[illuminate/translation

The Illuminate Translation package.

6936.4M491](/packages/illuminate-translation)[lajax/yii2-translate-manager

Translation management extension for Yii 2

227578.8k13](/packages/lajax-yii2-translate-manager)[larswiegers/laravel-translations-checker

Make sure your laravel translations are checked and are included in all languages.

256423.2k2](/packages/larswiegers-laravel-translations-checker)

PHPackages © 2026

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