Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // PHP Browser Language Detect
- <?php $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); ?>
- // Load Result into Variable
- <script type="text/javascript">
- <?php if ($lang) { ?>
- $().ready(function () {
- window.lang.change('<?php echo($lang); ?>');
- });
- <? } ?>
- </script>
Add Comment
Please, Sign In to add comment