Recommend this page to a friend! |
![]() |
Info | Documentation | ![]() |
![]() |
![]() |
Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2025-06-09 (2 days ago) ![]() | Not yet rated by the users | Total: Not yet counted | Not yet ranked |
Version | License | PHP version | Categories | |||
site-language-redire 1.0 | MIT/X Consortium ... | 7 | Localization, HTTP, Content management, P... |
Description | Author | |||||||||||||
This package can redirect TYPO3 users to a site of their language. |
|
Please read this document to learn how to redirect accesses from users that prefer different languages to site pages with content in those languages.
PSR-15 middleware to redirect user to correct site language.
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.
Install via Extension Manager or composer.
composer require urbantrout/site-language-redirection
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
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.
Update the preferred method in your site configuration in the tab Site Language Redirection. Defaults to HTTP headers.
Changing this value to IP address updates `config/sites/<sitename>/config.yaml` and adds the following line of code:
SiteLanguageRedirectionMethod: 2
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'
![]() |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() |
||||
![]() |
||||
![]() |
||||
![]() ![]() |
Example | Example script | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Aux. | Configuration script | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Doc. | Documentation |
![]() |
/ | Classes | / | Middleware |
File | Role | Description |
---|---|---|
![]() |
Class | Class source |
![]() |
/ | Configuration |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() |
Class | Class source | ||
![]() |
Class | Class source |
![]() |
/ | Configuration | / | SiteConfiguration | / | Overrides |
File | Role | Description |
---|---|---|
![]() ![]() |
Aux. | Configuration script |
![]() |
/ | Documentation |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Doc. | Documentation | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data |
![]() |
/ | Documentation | / | Images |
File | Role | Description |
---|---|---|
![]() ![]() |
Icon | Icon image |
![]() ![]() |
Icon | Icon image |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
![]() |
Version Control | Unique User Downloads | |||||||
100% |
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.