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

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

mohsinqk/site-language-redirection
==================================

v2.4.0(2y ago)0447GPL-2.0-or-laterPHP

Since Mar 27Pushed 2y agoCompare

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

READMEChangelogDependencies (3)Versions (3)Used By (0)

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

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

This extension is a copy of the [TYPO3 Site Language Redirection](https://github.com/urbantrout/site-language-redirection) extension. As I have added a new feature to disable language redirect for multisite enviroments of TYPO3. So this repo is usefull untill author of the base extension merge my change request for [my feature](https://github.com/urbantrout/site-language-redirection/pull/51).

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

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.7% 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

Unknown

Total

1

Last Release

773d ago

### Community

Maintainers

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

---

Top Contributors

[![urbantrout](https://avatars.githubusercontent.com/u/10465787?v=4)](https://github.com/urbantrout "urbantrout (55 commits)")[![MohsinQK](https://avatars.githubusercontent.com/u/1622975?v=4)](https://github.com/MohsinQK "MohsinQK (2 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

localizationlanguageextensionmultilanguagetypo3detection

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/mohsinqk-site-language-redirection/health.svg)](https://phpackages.com/packages/mohsinqk-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)
