locale_accept_from_http($_SERVER['HTTP_ACCEPT_LANGUAGE'])

Locale::acceptFromHttp($_SERVER['HTTP_ACCEPT_LANGUAGE'])

Locale::acceptFromHttp -- locale_accept_from_http — Tries to find out best available locale based on HTTP "Accept-Language" header. php