Answer the question
In order to leave comments, you need to log in
Why do you need to specify the language in the address bar in a multilingual site if it can be taken from the session?
Why, for example toster.ru/ru/node
, specify the language in the address bar, if you can take the client's language from the session?
Here's what I'm doing so far. I determine the language by the client's browser
$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
$_SESSION['lang'] = $lang;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question