PHPackages                             koseduhemak/zf3-locale-router - 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. koseduhemak/zf3-locale-router

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

koseduhemak/zf3-locale-router
=============================

Setup language-aware routes in Zend Framework 3 applications like f.e. www.example.com/de/my/uri for German or www.example.com/en/my/uri for English.

20220128a(4y ago)32482MITPHPPHP ^7.1 || ^7.2 || ^7.3 || ^7.4CI failing

Since Dec 19Pushed 4y ago1 watchersCompare

[ Source](https://github.com/koseduhemak/zf3-locale-router)[ Packagist](https://packagist.org/packages/koseduhemak/zf3-locale-router)[ RSS](/packages/koseduhemak-zf3-locale-router/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependencies (15)Versions (30)Used By (0)

LocaleRouter
============

[](#localerouter)

[![Build Status](https://camo.githubusercontent.com/3817a874dbee326bf1231e24a6d7ec608f54fc4f16cb48a1df4c9acfd2fb3426/68747470733a2f2f7472617669732d63692e6f72672f6b6f7365647568656d616b2f7a66332d6c6f63616c652d726f757465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/koseduhemak/zf3-locale-router)[![Coverage Status](https://camo.githubusercontent.com/c9ffa52669b365d83d423007d09f53eddd0edd2717f3f7a34cf3331b1c570587/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6b6f7365647568656d616b2f7a66332d6c6f63616c652d726f757465722f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/koseduhemak/zf3-locale-router?branch=master)

This module is intended to implement URIs like `http://www.example.com/de/path/path2` or `http://www.example.com/en/path/path2` in your ZF3 application. To achieve this, multiple strategies can be used to extract the best suited locale for a user (and redirect him to the correct uri). This is f.e. necessary for SEO. If you need to extract the current locale, you can use `\Locale::getDefault();` to return the current set locale (f.e. `de_DE`).

The strategies are processed in the **order you configured** them and is stopped as soon as the locale could be extracted.

Thanks to the creators of the modules  and , from which I took a little bit inspiration from.

If you like my module, you can buy me a beer or some coffee:

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

[](#installation)

Install via composer:

```
$ composer require koseduhemak/zf3-locale-router
```

Usage
-----

[](#usage)

Read more about configuration options and different extracting / persisting strategies: [configuration manual](docs/strategies.md).

Buy me a beer / coffee
----------------------

[](#buy-me-a-beer--coffee)

If you like my module, you can buy me a beer or some coffee:

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity74

Established project with proven stability

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

Recently: every ~268 days

Total

27

Last Release

1617d ago

Major Versions

1.0.23 → 2.0.02020-10-29

PHP version history (2 changes)1.0.0PHP ^7.0 || ^7.1 || ^7.2

2.0.0PHP ^7.1 || ^7.2 || ^7.3 || ^7.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/12804757?v=4)[Maximilian Füsslin](/maintainers/koseduhemak)[@koseduhemak](https://github.com/koseduhemak)

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/koseduhemak-zf3-locale-router/health.svg)

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

###  Alternatives

[magento/community-edition

Magento 2 (Open Source)

12.2k53.6k13](/packages/magento-community-edition)[wheelpros/fitment-platform-api

Magento 2 (Open Source)

12.1k1.2k](/packages/wheelpros-fitment-platform-api)[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

5.1k5.2k](/packages/shlinkio-shlink)[slm/locale

Automatic detection of locales for Laminas

68287.9k6](/packages/slm-locale)[kokspflanze/bjy-authorize

Laminas\\Acl based firewall system for Mezzio dispatch protection

20199.4k4](/packages/kokspflanze-bjy-authorize)[sylius/locale

Locale handling for PHP applications.

10561.9k29](/packages/sylius-locale)

PHPackages © 2026

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