Hi,
I want to determine language of a webpage. I researched and found a couple of things:
There are 3 different ways that is used to mention the language:
- the HTML tag
<html lang="en">
</html>
- In XHTML, the language is declared inside the <html> tag as follows:
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
...
</html>
- The meta tag
<meta http-equiv="Content-Language" content="ru"/>
Is there any other way ? Can any use use preg_match and give me a code/function that give me the language code ? (en, ru, gr, fr,etc etc) ?
Best Regards
ZH