Finding the PHP Browser Language HTTP_ACCEPT_LANGUAGE

You can use HTTP_ACCEPT_LANGUAGE to find the browser's language using php. Using the simple php code below, you can find the user's language and redirect it to that page, especially when making multilingual sites.
<?php echo $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); ?>

0 Yorum

Soru & Yorum

Web Tasarım

Renkli Kare

Web Tasarım Ajansı