Detect Region Format on Mobile Safari (IOS) with PHP (<5.3 ) or JAVASCRIPT

hqlove

New Member
I'm going Mad trying to get the user Region Format (not the language) from a IOS/mobile Safari browser;
I want to redirect a user to a US page if for example he had these settings:
Language : EN
Regional : US
but i always get en-us on mobile safari,either if the system settings are both language = en, region= en
I tried both Server side and Client side apporachwith PHP I tried (system settings: lang=en / region=en)\[code\]$lang_string = $_SERVER['HTTP_ACCEPT_LANGUAGE'];echo $lang_string;//en-US,en; on Chrome Desktop//en-US; on Safari Desktop with UserAgent iPad//en-US; on Mobile Safari\[/code\]with javascript approach, (system settings: lang=en / region=en)\[code\]alert(window.navigator.language)\[/code\]always en-us!!is there a way to get the user region?(i know that should be possiible with The Locale class (PHP 5 >= 5.3.0, PECL intl >= 1.0.0) I but did not tested and I can't upgrade the server version)thank you for help!
 
Back
Top