PHP ~ get browser language

這寫法是只取最優先的語言XD


$langs = explode(',',$_SERVER['HTTP_ACCEPT_LANGUAGE']);

print $langs[0];

reference
http://snipplr.com/view/12631/detect-browser-language/

沒有留言: