PHPackages                             urbantrout/site-language-redirection - 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. urbantrout/site-language-redirection

ActiveTypo3-cms-extension[Localization &amp; i18n](/categories/localization)

urbantrout/site-language-redirection
====================================

v2.3.3(3y ago)938.2k↓42.3%15[10 issues](https://github.com/urbantrout/site-language-redirection/issues)[12 PRs](https://github.com/urbantrout/site-language-redirection/pulls)GPL-2.0-or-laterPHP

Since Aug 9Pushed 2y ago1 watchersCompare

[ Source](https://github.com/urbantrout/site-language-redirection)[ Packagist](https://packagist.org/packages/urbantrout/site-language-redirection)[ RSS](/packages/urbantrout-site-language-redirection/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (3)Versions (25)Used By (0)

TYPO3 Site Language Redirection
===============================

[](#typo3-site-language-redirection)

PSR-15 middleware to redirect user to correct site language.

- Language detection is based on HTTP headers (browser language) or IP address.
- When the user switches the language, a cookie gets set to save the new language as preferred language.

How it works
------------

[](#how-it-works)

Example of how the extensions determines the site to redirect to via HTTP headers:

If Accept-Language is `en-US,de-AT` it looks for sites with an hreflang of `en-US`. If there is no match it then looks for `en`. If there is still no match it repeats the same logic with `de-AT` and so on.

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

[](#installation)

Install via Extension Manager or composer.

`composer require urbantrout/site-language-redirection`

### Enable IP address based redirects

[](#enable-ip-address-based-redirects)

1. Update the GeoIP2 database file for IP address based redirects via CLI or Scheduler.

    - **CLI**
        `./vendor/bin/typo3 sitelanguageredirection:updatedb`
    - **Scheduler**
        Create new task of class **Excute console commands** and set **Schedulable Command** to **sitelanguageredirection:updatedb**
        [![Settings of new scheduler task](Documentation/Images/scheduler.png)](Documentation/Images/scheduler.png)
        Use this option to periodically update your database file.

    This step creates a file under `\TYPO3\CMS\Core\Core\Environment::getVarPath() . '/sitelanguageredirection/'` with all the geolocation information.
    **Note:** This does not alter your SQL database.
2. Update the preferred method in your site configuration in the tab **Site Language Redirection**. Defaults to HTTP headers.
    [![Screenshot of Site Language Redirection tab in site configuration](Documentation/Images/site-config.png)](Documentation/Images/site-config.png)
    Changing this value to **IP address** updates `config/sites//config.yaml` and adds the following line of code:

```
SiteLanguageRedirectionMethod: 2
```

### Configure Language Fallbacks

[](#configure-language-fallbacks)

This feature adds the possibility to define fallback languages. So for instance, if there's no italian version of the website, redirect to english version, and so on.

Site configuration would look like this with optional `SiteLanguageRedirectionFallbacks`:

```
SiteLanguageRedirectionMethod: 1
SiteLanguageRedirectionFallbacks:
  fr: 'en'
  it: 'en'
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 94.8% 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 ~54 days

Recently: every ~188 days

Total

21

Last Release

1386d ago

Major Versions

v1.1.0 → v2.0.02019-10-14

### Community

Maintainers

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

---

Top Contributors

[![urbantrout](https://avatars.githubusercontent.com/u/10465787?v=4)](https://github.com/urbantrout "urbantrout (55 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![georgringer](https://avatars.githubusercontent.com/u/1905663?v=4)](https://github.com/georgringer "georgringer (1 commits)")[![rafu1987](https://avatars.githubusercontent.com/u/2694825?v=4)](https://github.com/rafu1987 "rafu1987 (1 commits)")

---

Tags

geolocationlanguageredirectssite-language-redirectiontypo3typo3-extensionlocalizationlanguageextensionmultilanguagetypo3detection

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/urbantrout-site-language-redirection/health.svg)

```
[![Health](https://phpackages.com/badges/urbantrout-site-language-redirection/health.svg)](https://phpackages.com/packages/urbantrout-site-language-redirection)
```

###  Alternatives

[leuchtfeuer/locate

Locate - The users country, preferred language and other facts will be detected. Depending on configurable rules the user can be redirected to other languages or pages. Locate also provides geo blocking for configurable pages in configurable countries.

1182.8k](/packages/leuchtfeuer-locate)[inpsyde/multilingual-press

Simply THE multisite-based free open source plugin for your multilingual websites.

2414.0k1](/packages/inpsyde-multilingual-press)[flarum-lang/russian

Russian language pack for Flarum.

13126.1k](/packages/flarum-lang-russian)[stefanfroemken/repair_translation

Get rid of displaying the default file in translated records

2364.6k](/packages/stefanfroemken-repair-translation)[georgringer/extbase-with-no-l10n-parent

Show records in extbase if those got a different language defined then -1 (all) or 0 (default) and no language parent

12103.4k](/packages/georgringer-extbase-with-no-l10n-parent)

PHPackages © 2026

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