This project is not covered by Drupal’s security advisory policy.

This small project provides the ability for your Drupal 9 website to redirect new users to the correct translation language of your website based on the user's browser language preference.

Features

The project was created when we get the task to redirect a user to configured translation when the user first gets to the website. And most of the modules had too much functionality(not needed in the context of the task) or too much of configurations(some third-party services) or basically had conflicts with already presented features on our website as language switchers. So was decided to leave this module for the community, maybe it will solve someone's similar tasks.

Post-Installation

Basically, when the user first log in to your website it detects his browser's preferred language and checks for your mapping configurations in language detection and selection - Browser method, then if there is configured translation for this specific language and the node has been translated to this language - redirects the user to the correct translation and adding a cookie in order to avoid further redirections and allow a user to switch freely between languages using such features as for example language switcher.

Additional Requirements

This module's proper work depends on Drupal multilingual extensions, and configurations in detection and selection(admin->config->regional and language->languages->detection and selection(or simply by this url: /admin/config/regional/language/detection)). Then configure and enable the Browser detection method.

Basically, this module does good work in the pair with lang_dropdown(Language Switcher Dropdown) module.

Similar projects

There are some modules on drupal.org that have similar functions, but this module is basically very simple and uses the Drupal core basic language detection method(browser detection), so you don't need lots of additional configurations.

Supporting organizations: 

Project information

Releases