I have a small search engine site and I was wondering if there was any way of displaying my site in the users language. I am looking for an inventive and quick way that can also reside on just one URL.
I hope you can understand my question.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could use the HTTP header “
Accept-Language“, to detect which languages the user has choosen as its prefered ones, in his browser.In PHP, this will be available (if sent by the browser) in
$_SERVER, which is an array that contains (amongst other things) HTTP headers sent by the client.This specific header should be available as
$_SERVER['HTTP_ACCEPT_LANGUAGE'].