...

View Full Version : How do I 'Declare Language' for my page ?



needsomehelp
11-22-2011, 09:58 AM
According to woorank.com my page shows the following.


Language
Declared: Missing
Detected: en

I have used

header('content-type: text/html; charset=utf-8');

but do not know how I declare the language.

how is this done ?

also how do i specify Language/character encoding

Kor
11-22-2011, 10:45 AM
http://www.w3.org/International/questions/qa-html-language-declarations

needsomehelp
11-22-2011, 11:14 AM
ok thanks.

when I validate the page using w3.org I get the following error.

No Character encoding declared at document level

I thought using

header('content-type: text/html; charset=utf-8');

set the encoding, if not what does ?

Kor
11-22-2011, 11:17 AM
That looks like a PHP method to me :)... What prevents you from using a classical META tag to define the charset?

needsomehelp
11-22-2011, 11:24 AM
That looks like a PHP method to me :)... What prevents you from using a classical META tag to define the charset?
HMTL5 validation !

VIPStephan
11-22-2011, 11:39 AM
HMTL5 validation !

Nonsense. http://nimbupani.com/declaring-languages-in-html-5.html

needsomehelp
11-22-2011, 12:10 PM
Nonsense. http://nimbupani.com/declaring-languages-in-html-5.html

ok I trust that you must be right, but... this is the error I get in w3.org validator...


Line 54, Column 35: Bad value language for attribute name on element meta: Keyword language is not registered.

<meta name="language" content="en">

Kor
11-22-2011, 12:48 PM
Because the correct syntax is:


<meta http-equiv="content-language" content="en">



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum