PHPackages                             liquidbcn/craftcms-language-redirect - 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. liquidbcn/craftcms-language-redirect

ActiveCraft-plugin[Localization &amp; i18n](/categories/localization)

liquidbcn/craftcms-language-redirect
====================================

Simple language redirector based on browser preferences

2.0.0(4mo ago)06283[1 PRs](https://github.com/LiquidBarcelona/craftcms-language-redirect/pulls)proprietaryPHP

Since Nov 14Pushed 4mo ago3 watchersCompare

[ Source](https://github.com/LiquidBarcelona/craftcms-language-redirect)[ Packagist](https://packagist.org/packages/liquidbcn/craftcms-language-redirect)[ RSS](/packages/liquidbcn-craftcms-language-redirect/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (2)Versions (14)Used By (0)

Language Redirect for Craft CMS
===============================

[](#language-redirect-for-craft-cms)

Redirects users to localized URLs based on browser language preferences. When a user visits your site's root path (`/`), the plugin detects their browser language and redirects them to the appropriate localized URL.

Requirements
------------

[](#requirements)

- Craft CMS 5.0.0 or later
- PHP 8.2 or later

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

[](#installation)

```
composer require liquidbcn/craftcms-language-redirect
```

Then go to Settings → Plugins and click "Install".

Configuration
-------------

[](#configuration)

### Option 1: Control Panel (recommended)

[](#option-1-control-panel-recommended)

Go to Settings → Plugins → Language Redirect and configure:

- **Default Language**: Fallback locale if browser language isn't in your URL list (e.g., `en-GB`)
- **Language URLs**: Map locale codes to your site URLs

### Option 2: Config file

[](#option-2-config-file)

Create `config/language-redirect.php`:

```
