get HTTP_ACCEPT_LANGUAGE when necessary

Only get the HTTP_ACCEPT_LANGUAGE value when necessary
Merge pull request #2498 from anrip/master

get HTTP_ACCEPT_LANGUAGE when necessary