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

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

sokil/locale-bundle
===================

Localization and internationalization in Symfony app

0.2(9y ago)019[1 issues](https://github.com/sokil/LocaleBundle/issues)MITPHPPHP ^5.5 || ^7.0

Since Aug 7Pushed 9y ago1 watchersCompare

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

READMEChangelog (5)Dependencies (4)Versions (6)Used By (0)

LocaleBundle
============

[](#localebundle)

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

[](#installation)

```
composer.phar require sokil/locale-bundle

```

Configure next parameters in `./app/config/config.yml`:

```
locale:
    query_parameter: lang
    cookie_parameter: lang
    path_parameter: false
    locales: # mapping of languages to locales
        uk: uk_UA.utf8
        en: en_US.utf8
```

Current language resolving
--------------------------

[](#current-language-resolving)

Servise `locale.preferred_language_listener` used to set current language from cookie, request URL or `Accept-Language` request header. It enabled by default, if bundle registered.

Switch languages
----------------

[](#switch-languages)

Action `setAction` from controller `Sokil\LocaleBundle\Controller\LangController` used to set current lang.

Locales provider
----------------

[](#locales-provider)

Service `locale.supported_locales_provider` used to get list of all supported languages with localised names of language.

To access [locales provider](https://github.com/sokil/LocaleBundle/blob/master/src/Provider/SupportedLocalesProvider.php) from twig template, add global twig variable in `./app/config/config.yaml`:

```
twig:
    globals:
        locales_provider: "@locale.supported_locales_provider"
```

###  Health Score

23

—

LowBetter than 25% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Total

5

Last Release

3388d ago

PHP version history (2 changes)0.1.0PHP ^5.6 || ^7.0

0.1.6PHP ^5.5 || ^7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/902e21ecf6517341b1f2a3c2f93a3eb115396fc6524effaeabc816b481909e64?d=identicon)[sokil](/maintainers/sokil)

---

Top Contributors

[![sokil](https://avatars.githubusercontent.com/u/1829948?v=4)](https://github.com/sokil "sokil (11 commits)")

---

Tags

localephpsymfony

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[smarty-gettext/smarty-gettext

Gettext plugin enabling internationalization in Smarty Package files

752.5M8](/packages/smarty-gettext-smarty-gettext)[renatomarinho/laravel-multi-language

Laravel Multi Language

235.1k](/packages/renatomarinho-laravel-multi-language)

PHPackages © 2026

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