Checker new messages

From Internationalization

Provides text for new messages for the i18n checker.


New messages

XML Declaration used

NOW DONE IN LOCAL COPY OF en.properties AND IMPLEMENTED IN LOCAL COPY OF class.Checker.php

Explanation

This page currently uses the following XML declaration:

[reproduce XML Decl from doc here]

XML declarations are not needed for HTML, and are only useful for documents processed as XML. XML declarations can be used with XHTML 1.0 and XHTML 1.1 pages, so that when those files are read by an XML parser, rather than an HTML parser, the encoding information is recognized.

Because an XML declaration in an HTML document can cause Internet Explorer to render in quirks mode rather than standards mode, XML declarations are not allowed in HTML5. You should also take this into account if serving XHTML 1.0 or XHTML 1.1 as HTML.

XHTML5 also forbids the use of XML declarations, but since XHTML5 pages must use the UTF-8 encoding there are no problems recognizing the encoding of the page. (UTF-8 is recognized by XML parsers without the need for an XML declaration.)

What to do

Remove the XML declaration from your page if you are using HTML4, HTML5 or XHTML5.

If you are using XHTML 1.x, use UTF-8 for your page and remove the XML declaration.

Further reading

  1. <a href="http://www.w3.org/International/techniques/authoring-html#gscharset">Character encodings explained</a>
  2. <a href="http://www.w3.org/International/techniques/authoring-html#indoc">Declaring the character encoding for HTML</a>

No visible in-document encoding declared

[rep_no_visible_charset]

DONE IN LOCAL COPY OF EN.PROPERTIES

Explanation

The character encoding of this page is indicated using a byte-order mark.

[reproduce all decls from doc here]

Although this is usually sufficient to indicate to a browser what is the encoding of the page, the W3C Internationalization (i18n) Group recommends to always include a visible encoding declaration in a document as well, because it helps developers, testers, or translation production managers to check the encoding of a document visually.

What to do

Add a meta tag or XML declaration, as appropriate, to your page to indicate the character encoding used.

Further reading

  1. <a href="http://www.w3.org/International/techniques/authoring-html#gscharset">Character encodings explained</a>
  2. <a href="http://www.w3.org/International/techniques/authoring-html#indoc">Declaring the character encoding for HTML</a>

Meta encoding declarations don't work with XML

[rep_meta_ineffective]

DONE IN LOCAL COPY OF EN.PROPERTIES

Explanation

This page is being served as XML and uses the following character encoding declaration in a meta tag:

[reproduce meta tag from doc here]

Encoding declarations in meta tags are not recognised by XML processors, so this declaration has no actual effect. The XML processor will recognize the encoding as UTF-8 or UTF-16 by sniffing the start of the file.

It is useful to have a visible in-document declaration because it helps developers, testers, or translation production managers to check the encoding of a document visually, but in this case it would be better to use the XML declaration rather than a meta tag.

What to do

Remove the meta tag and ensure you have an XML declaration with encoding information.

Further reading

  1. <a href="http://www.w3.org/International/techniques/authoring-html#gscharset">Character encodings explained</a>
  2. <a href="http://www.w3.org/International/techniques/authoring-html#indoc">Declaring the character encoding for HTML</a>

Incorrect use of meta encoding declarations

[rep_incorrect_use_meta]

DONE IN LOCAL COPY OF EN.PROPERTIES

Explanation

The only character encoding declaration for this page is in the following meta element, which specifies an encoding that is neither UTF-8 nor UTF-16:

[reproduce meta tag from doc here]

If a document is treated as XML and is encoded as neither UTF-8 nor UTF-16, you must declare the encoding in the XML declaration. The meta tag declaration is not recognized by an XML processor. This document will be treated as UTF-8.

What to do

For documents served only as XML, remove the meta tag and add an XML declaration with encoding information.

For XHTML documents served as HTML (text/html), add an XML declaration with encoding information, or use UTF-8 as the character encoding of your page.

Further reading

  1. <a href="http://www.w3.org/International/techniques/authoring-html#gscharset">Character encodings explained</a>
  2. <a href="http://www.w3.org/International/techniques/authoring-html#indoc">Declaring the character encoding for HTML</a>

Meta charset tag will cause validation to fail

[rep_meta_charset_invalid]

DONE IN LOCAL COPY OF EN.PROPERTIES

Explanation

This page is not HTML5 and uses the following meta element to specify the character encoding:

[reproduce meta tag from doc here]

Although all major browsers now recognize this character encoding declaration, and act appropriately, the charset attribute on a meta tag is only part of the HTML5 specification. This means that, although things will work as you expect in the browser, if you try to validate this page you will receive an error message.

What to do

If you want your pages to validate as HTML 4.01, change the meta charset declaration to a meta Content-Type declaration.

Further reading

  1. <a href="http://www.w3.org/International/techniques/authoring-html#gscharset">Character encodings explained</a>
  2. <a href="http://www.w3.org/International/techniques/authoring-html#indoc">Declaring the character encoding for HTML</a>

No in-document encoding declaration found

[rep_no_encoding_xml]

DONE IN LOCAL COPY OF EN.PROPERTIES

Explanation

No character encoding is declared for this page. Since it is being served as XML, the browser and any XML processor will assume that the encoding is UTF-8. If you are not saving your document as UTF-8, you will find that characters are being corrupted.

Even if you are intending the document to be read as UTF-8, the W3C Internationalization (i18n) Group recommends to always include a visible encoding declaration in a document, because it helps developers, testers, or translation production managers to check the encoding of a document visually.

What to do

Add information to indicate the character encoding of the page inside the page itself.

Further reading

  1. <a href="http://www.w3.org/International/techniques/authoring-html#gscharset">Character encodings explained</a>
  2. <a href="http://www.w3.org/International/techniques/authoring-html#indoc">Declaring the character encoding for HTML</a>

No effective character encoding information

[rep_no_effective_charset]

NOW IMPLEMENTED IN LOCAL COPY OF en.properties

Explanation

This page declares a character encoding in the following XML declaration.

[show XML declaration here]

An HTML parser does not recognize encoding declarations in the XML declaration, so effectively no encoding has been specified for this page.

What to do

Add a meta element to indicate the character encoding of the page. You could also declare the encoding in the HTTP header, but it is recommended that you always use a meta element too.

Further reading

  1. <a href="http://www.w3.org/International/techniques/authoring-html#gscharset">Character encodings explained</a>
  2. <a href="http://www.w3.org/International/techniques/authoring-html#indoc">Declaring the character encoding for HTML</a>

The html tag has no effective language declaration

[rep_html_no_effective_lang]

NOW IMPLEMENTED IN LOCAL COPY OF en.properties

Explanation

There is no effective language attribute in the html tag.

[show html tag here]

A language attribute on the html tag sets the default natural language for the page. This information can be used for processing the content in various ways, including such things as spell-checking, accessibility, data formatting, and choice of styles for rendering the page. Every page should have the correct default language specified.

HTML parsers only recognize the lang attribute. XML parsers only recognize the xml:lang attribute. On this page the wrong attribute is being used, and so the language is not being set.

What to do

For pages served as HTML, use the lang attribute. For pages served as XML, use the xml:lang attribute. For pages, such as XHTML 1.0 that may be treated as either HTML or XML, use both.

Further reading

  1. <a href="http://www.w3.org/International/techniques/authoring-html#gslang">Language declarations explained</a>
  2. <a href="http://www.w3.org/International/techniques/authoring-html#textprocessing">Using attributes to declare language</a>
  3. <a href="http://www.w3.org/International/techniques/authoring-html#langvalues">Choosing language values</a>

Content-Language meta element used

[rep_content_lang_meta]

NOW IMPLEMENTED IN LOCAL COPY OF en.properties

Explanation

This page uses a meta element with a Content-Language value.

[show CL meta tag here]

The HTML5 specification has made this type of meta element obsolete in HTML, so you should not use it for pages written in HTML5. This is due to the confusion surrounding the use of this construct.

Given this, it is strongly recommended that you not use this Content-Language meta element in any HTML format, and also because implementations are inconsistent in the way they handle it.

If you want to express the default language of the page, you should use an attribute in the html tag instead.

What to do

Remove the Content-Language meta element, and ensure that you have used an attribute on the html tag to specify the default language of the page.

Further reading

  1. <a href="http://www.w3.org/International/techniques/authoring-html#gslang">Language declarations explained</a>
  2. <a href="http://www.w3.org/International/techniques/authoring-html#textprocessing">Using attributes to declare language</a>
  3. <a href="http://www.w3.org/International/techniques/authoring-html#langvalues">Choosing language values</a>

Changes to existing messages

Encoding declared only in HTTP

[rep_charset_no_in_doc]

Append the following paragraph to the explanation:

The W3C Internationalization (i18n) Group recommends to always include a visible encoding declaration in a document, because it helps developers, testers, or translation production managers to check the encoding of a document visually.

DONE IN LOCAL COPY OF EN.PROPERTIES

No character encoding information

[rep_charset_none]

Append the following paragraph to the explanation:

The W3C Internationalization (i18n) Group recommends to always include a visible encoding declaration in a document, because it helps developers, testers, or translation production managers to check the encoding of a document visually.

DONE IN LOCAL COPY OF EN.PROPERTIES

A tag uses a lang attribute without an associated xml:lang attribute

[rep_lang_missing_xml_attr]

Change "It is for this reason that the XHTML specification recommends that you use both." to say "For XHTML served as HTML you should use both. For files served as XML only, you should have xml:lang, but you don't need to have the lang attribute."

DONE IN LOCAL COPY OF EN.PROPERTIES