Take the 2-minute tour ×

To be specific, how do you check the web page source to determine whether this web page is shown in English or other language, such as Japanese or French?

share|improve this question
add comment

2 Answers

The following information will NOT always be present, and it will not actually tell you what language is used on the website.
charset, as in <meta http-equiv="Content-Type" content="text/html; charset=blah">
if charset is set to EUC-KR, you know its targeted towards people in korea, and korean characters can be used... [alt codes]

Of course, even if EUC-KR is set as the charset, you can still use the english alphabet, and of course, write english sentences...

Other than that, the only other way for you to detect the language of a website would be... actually looking at individual words and checking to see what dictionary they're in...

share|improve this answer
add comment

It's not possible, really.

I mean, lets consider that a given page can be shown in both English and French at the same time. Perhaps you want to get something like the request-language in JavaScript. I think something like this may be available in the user-agent string, which you can get (infact, perhaps the object has the request-language directly in it somewhere).

Of course, even if you do get this, it doesn't mean the page is in that language.

Given that you are the server, and you know what language you rendered in (hopefully) you can just pass this information to JavaScript via some variable.

share|improve this answer
add comment

Your Answer


