Forum Moderators: open
AddLanguage en .html
will add this to the headers of all .html pages:
Content-Language: en
but I am not sure if that replaces the lang="en" in the html tag below.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
Thanks for the info, in relation to this thread, this is exactly what I have in my html:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="Content-Language" content="en">
</head>
So, I assume that I can change things so that it's now:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
</head>
Can you see any other changes, assuming I put the code referred to before in my servers?
Dexie.
AddType 'text/html; charset=ISO-8859-1' html
For PHP I use:
AddDefaultCharset On
So, assuming you use html, to get rid of the metas on your pages you would have to use this:
AddDefaultCharset On
Content-Language: en
so that I don't have to input code into my webpages to identify the language it should be read in please?
Using the lang attribute for the html tag within your html document - <html lang="de"> for example - is still a good idea. It is the standard, in fact, although not yet widely implemented.
You cannot tell what signs different search engines will be taking into account. Especially if you have non-English pages I'd suggest covering all the bases for the best results. Many servers give wrong http information and if I were creating any kind of search engine, I would look at everything possible to get an accurate idea of what the language of a page really is.
</quote>
Thanks for the help on this.
Could I avoid this though, by implemtning the codes above by Span, into the .htaccess?
Dexie.
Should I declare the language of my XHTML document using a language attribute, the Content-Language HTTP header, or a meta element?
[w3.org ]
And about setting the language in the HTTP header and offline reading, well, I think at least 99.99% of all pages on the web have no language specified anywhere. I have never saved a page to disc that I couldn't read because of the absence of a language attribute or meta.