Declaring Languages in HTML 5

Here is how you can declare the language of your document in HTML 5.

Web Development is infinitely more troublesome when you have documents in languages other than American English. The onus is on us web developers and server administrators to make sure browsers and search engines can detect the right language. Here is how you can declare the language of your document in HTML 5.

What is language declaration?

This is a way to specify what language a HTML document or a snippet of HTML text is in. Language declaration does not provide information on character encoding and the text direction (right to left or left to right). Those need to be declared separately.

Why specify a language?

Language information can be used for:

  • Text to speech converters (e.g. speak Canadian french rather than french)
  • Selecting the right fonts for display (e.g. use traditional chinese script instead of the simplified one)
  • Selecting the right dictionary for browser spell-checks in forms (use UK English rather than US English)
  • Rendering the page correctly — in short deliver the document in its most natural language as possible.
*Read the full article at the external site.

Lubov Cholakova

Lubov CholakovaLubov has been with DMXzone for 8 years now, contributing to the Content and Sales departments. She is bringing high quality content in the form of daily blog updates, reviews, tutorials, news, newsletters,update emails and extensions' manuals. If you have a product that needs publicity or any other questions about the entire DMXzone community, she is the one you can contact.

See All Postings From Lubov Cholakova >>

Comments

Be the first to write a comment

You must me logged in to write a comment.