How I can redirect users to home page in default language? For example to sait.com/fr from sait.com/ when user almost came.
I tried to use front-page module but he redirects to sait.com//fr/fr instead sait.com/fr
How I can redirect users to home page in default language? For example to
Share
You can store a cookie variable on client that a user has visited after a comes first time, and before that check if the cookie value is set or not.
Create a custom module and in the hook_init() method of your module, check if the cookie is set, then don’t redirect anywhere, if it’s not set, set the value and then redirect him to the default language home page.
if(!isset($_COOKIE['user_visited])) { $_COOKIE['user_visited] = true; global $language $default_language = variable_get('language_default', $language); drupal_goto($default_language->prefix); }