esign / craft-multi-site-language-redirect
automatically redirects users to the appropriate site in a Craft CMS multisite setup based on their browser language or previously selected language.
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:craft-plugin
Requires
- php: >=8.2
- craftcms/cms: ^5.0.0
Requires (Dev)
- craftcms/ecs: dev-main
- craftcms/phpstan: dev-main
This package is not auto-updated.
Last update: 2025-09-17 08:36:09 UTC
README
automatically redirects users to the appropriate site in a Craft CMS multisite setup based on their browser language or previously selected language.
Requirements
This plugin requires Craft CMS 5.0.0 or later, and PHP 8.2 or later.
Installation
You can install this plugin from the Plugin Store or with Composer.
From the Plugin Store
Go to the Plugin Store in your project's Control Panel and search for "MultiSite Language Redirect". Then press "Install".
With Composer
Open your terminal and run the following commands:
# go to the project directory cd /path/to/my-project.test # tell Composer to load the plugin composer require esign/craft-multi-site-language-redirect # tell Craft to install the plugin ./craft plugin/install multi-site-language-redirect
Configuration
Route Exclusions
You can exclude specific routes from language redirection in two ways:
Global Excluded Routes
Routes that should be excluded across all site groups. These are useful for system routes like /robots.txt
or API endpoints.
Site Group Specific Excluded Routes
Routes that should be excluded only for specific site groups. This allows for more granular control when different site groups have different requirements.
Wildcard Support
Both global and site group specific exclusions support wildcard matching using *
:
/api/*
- Excludes all routes starting with/api/
/special-*
- Excludes routes like/special-page
,/special-content
, etc.
Configuration via Settings
Configure route exclusions through the plugin settings in the Craft CMS control panel under Settings → Plugins → MultiSite Language Redirect.
Configuration via Config File
For advanced configuration, you can also manage plugin settings through a config file. Create config/multi-site-language-redirect.php
in your Craft project and copy the settings from the example configuration file.
License
The MIT License (MIT). Please see License File for more information.