Installation

Install the extension either via the Extension Manager or composer composer require urbantrout/site-language-redirection.

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.

      Use this option to periodically update your database file.

  2. Update the preferred method in your site configuration in the tab Site Language Redirection. Defaults to HTTP headers.

    Screenshot showing the Site Language Redirection tab in the site configuration.

    This updates config/sites/<sitename>/config.yaml and adds the following line of code:

    SiteLanguageRedirectionMethod: 1