Fixed check client http header, not session.

Signed-off-by: D9ping <D9ping@users.noreply.github.com>
pull/1/head
D9ping 7 years ago
parent e4107870e8
commit 1526ae6b86

@ -14,7 +14,7 @@
*
* Refer to: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4
*/
if (empty($_SESSION['locale']) && strlen($_SESSION['locale']) >= 2) {
if (empty($_SESSION['locale']) && strlen($_SERVER['HTTP_ACCEPT_LANGUAGE']) >= 2) {
$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
switch ($lang){
case "de":

Loading…
Cancel
Save