Page 1 of 1

natural primary language and Editing Tip

Posted: Sun Dec 18, 2011 5:25 am
by Walter Metzger
Good day,

First
with Validator Pro 11.0032 I get the (new?) message (Warning for line 9)

The natural primary language is not specified. It is highly recommended that the "lang" and/or "xml:lang" (for XHTML) attribute be used with the "html" tag to specify the primary language. For example, use lang="en" for English or lang="fr" for French. Specifying the language assists braille translation software, speech synthesizers, translation software, and has other benefits.

My line 9 is
<html xmlns="http://www.w3.org/1999/xhtml">

Sorry, i do not understand the warning and could not find a tip, what do I have to to?

Second
with Validator Pro 11.0032 I get the (new?) Comment

Editing Tip: This document was specified as UTF-8 encoded. Editing documents with the wrong encoding may cause document corruption. Make sure that any editor used to edit a document properly supports the document's encoding and properly loads it with the correct encoding. CSE HTML Validator's editor supports UTF-8 and other common encodings.

I have defined:

<?xml version="1.0" encoding="UTF-8"?>
and
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />

I translate all german special characters as "ä, ß" etc.
I use only HTML Validator's editor, so I have no problems or?

Thanks for answers
and greetings
Happy Christmas
and a Good New Year 2012
Walter Metzger (no snow in our region)
Germany

Re: natural primary language and Editing Tip

Posted: Mon Dec 19, 2011 10:05 am
by Albert Wiersch
Walter Metzger wrote:Good day,

First
with Validator Pro 11.0032 I get the (new?) message (Warning for line 9)

The natural primary language is not specified. It is highly recommended that the "lang" and/or "xml:lang" (for XHTML) attribute be used with the "html" tag to specify the primary language. For example, use lang="en" for English or lang="fr" for French. Specifying the language assists braille translation software, speech synthesizers, translation software, and has other benefits.

My line 9 is
<html xmlns="http://www.w3.org/1999/xhtml">

Sorry, i do not understand the warning and could not find a tip, what do I have to to?
Hello,

You can use something like this (assuming the primary language of your page is English):
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
Walter Metzger wrote:Second
with Validator Pro 11.0032 I get the (new?) Comment

Editing Tip: This document was specified as UTF-8 encoded. Editing documents with the wrong encoding may cause document corruption. Make sure that any editor used to edit a document properly supports the document's encoding and properly loads it with the correct encoding. CSE HTML Validator's editor supports UTF-8 and other common encodings.

I have defined:

<?xml version="1.0" encoding="UTF-8"?>
and
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />

I translate all german special characters as "ä, ß" etc.
I use only HTML Validator's editor, so I have no problems or?
No, you shouldn't have any problems with recent versions of CSE HTML Validator's editor as it should see the XML declaration that specifies UTF-8 encoding and thus open the document with that encoding; but if you ever see that characters are not what they should be, then there is a problem and you should investigate further before saving the document as there is the possibility of corruption.
Walter Metzger wrote:Thanks for answers
and greetings
Happy Christmas
and a Good New Year 2012
Walter Metzger (no snow in our region)
Germany
You're welcome! Merry Christmas to you as well (and Happy New Year)!

Re: natural primary language and Editing Tip

Posted: Mon Dec 19, 2011 3:31 pm
by Walter Metzger
Good evening Albert,

I replaced
<html xmlns="http://www.w3.org/1999/xhtml">
with
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
and the message "warning" no longer appears.

Thanks for your help
Walter