Monday, July 1, 2013

How to Declare Language with HTML in Blogger or website

Do you want to declare a Default Language of your website / blog? Then you came with the right place. When a person is creating an international website, blog etc. then it is important to describe its language either using HTML or XML Attributions. On the other hand, it also helps in Search Engine Optimization because by declaring a Language, Search Engine Algorithms won’t have to spend much time in studying and detecting its language manually. Though most of the popular Blogging platforms have built-in language declaration functionality, but Blogger Platform is not a robust platform.
Therefore, we have to manage things manually by adding XML or HTML Language attributions. In this article, I will learn you, how a person can declare language of a website with the help of HTML Coding.
If you are a WordPress user, then you have no need to do this, you'll have built-in functionality for declaring website language but blogger users aren't that lucky. If you have a blogger blog then you'll have to manually declare language by adding an HTML or XML code inside your blog template. Which I’m going to show you today, How to do that.

Significant Tips While Declaring Language of a Website:
There are lots of misconceptions in the minds of webmasters, bloggers etc. that how, when and where should they enter the HTML coding to define their website’s language. Fortunately, W3.ORG has provided the detailed information about the whole process. Consider the following tips. 

Define the language attribution in each and every page of a website.
Specify the language code in the URL as well while declaring language.
Always utilize language or xml:lang attribution to define language of a website.
Do not add the language attribution in the between <body> </body> tags.

How to Declare Language of a Blog / Website with HTML?   
The main idea behind declaring language of a website is to provide friendly experience to different browsers and Search engines. If a person is thinking that after defining Language attributions his SEO will improve then he is committing a mistake because it has low Impact on (SEO) Search Engine Optimization. Furthermore, it will increase the crawling rate because crawlers will be able to fetch your content rather quickly.
Now Follow the below instructions to get started:

According to the prescribed rules by W3C, it’s essential to place the Language attributions inside the <html> tag. Consider the Following coding.
<html lang="en">
...
</html>

In XML, the coding is bit different but it must be placed inside the <html> Tag. Just like the following example.
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
...
</html>
Declaring Language in Blogger Platform:
Go To Blogger.com >> Template >> Edit HTML >> Proceed.
In Template, search for <html (Mostly, it will be on Top of the source code) and just next to it paste the following coding.
lang="en-US" xml:lang="en-US"
After pasting the above coding in the template, it would somewhat look like the following coding.
<html lang="en-US" xml:lang="en-US" b:version='2' class='v2' expr:dir='data:blog.languageDirection' xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'>

Once you have done, save the template by pressing Save Template button.
By default I have set the language attribute to English-United States (en-US) but if your website is of some other language then below is a complete list of languages and their ISO codes. Just replace en-US with your language code and Save Template.
ISO 639-1 Language Codes
ISO 639-1 defines abbreviations for languages. In HTML and XHTML they can be used in the lang and xml:lang attributes.

Language ISO Code
Abkhazian ab
Afar aa
Afrikaans af
Albanian sq
Amharic am
Arabic ar
Aragonese an
Armenian hy
Assamese as
Aymara ay
Azerbaijani az
Bashkir ba
Basque eu
Bengali (Bangla) bn
Bhutani dz
Bihari bh
Bislama bi
Breton br
Bulgarian bg
Burmese my
Byelorussian (Belarusian) be
Cambodian km
Catalan ca
Cherokee
Chewa
Chinese (Simplified) zh
Chinese (Traditional) zh
Corsican co
Croatian hr
Czech cs
Danish da
Divehi
Dutch nl
Edo
English en
Esperanto eo
Estonian et
Faeroese fo
Farsi fa
Fiji fj
Finnish fi
Flemish
French fr
Frisian fy
Fulfulde
Galician gl
Gaelic (Scottish) gd
Gaelic (Manx) gv
Georgian ka
German de
Greek el
Greenlandic kl
Guarani gn
Gujarati gu
Haitian Creole ht
Hausa ha
Hawaiian
Hebrew he, iw
Hindi hi
Hungarian hu
Ibibio
Icelandic is
Ido io
Igbo
Indonesian id, in
Interlingua ia
Interlingue ie
Inuktitut iu
Inupiak ik
Irish ga
Italian it
Japanese ja
Javanese jv
Kannada kn
Kanuri
Kashmiri ks
Kazakh kk
Kinyarwanda (Ruanda) rw
Kirghiz ky
Kirundi (Rundi) rn
Konkani
Korean ko
Kurdish ku
Laothian lo
Latin la
Latvian (Lettish) lv
Limburgish ( Limburger) li
Lingala ln
Lithuanian lt
Macedonian mk
Malagasy mg
Malay ms
Malayalam ml
Maltese mt
Maori mi
Marathi mr
Moldavian mo
Mongolian mn
Nauru na
Nepali ne
Norwegian no
Occitan oc
Oriya or
Oromo (Afaan Oromo) om
Papiamentu
Pashto (Pushto) ps
Polish pl
Portuguese pt
Punjabi pa
Quechua qu
Rhaeto-Romance rm
Romanian ro
Russian ru
Sami (Lappish)
Samoan sm
Sangro sg
Sanskrit sa
Serbian sr
Serbo-Croatian sh
Sesotho st
Setswana tn
Shona sn
Sichuan Yi ii
Sindhi sd
Sinhalese si
Siswati ss
Slovak sk
Slovenian sl
Somali so
Spanish es
Sundanese su
Swahili (Kiswahili) sw
Swedish sv
Syriac
Tagalog tl
Tajik tg
Tamazight
Tamil ta
Tatar tt
Telugu te
Thai th
Tibetan bo
Tigrinya ti
Tonga to
Tsonga ts
Turkish tr
Turkmen tk
Twi tw
Uighur ug
Ukrainian uk
Urdu ur
Uzbek uz
Venda
Vietnamese vi
Volapük vo
Wallon wa
Welsh cy
Wolof wo
Xhosa xh
Yi
Yiddish yi, ji
Yoruba yo
Zulu zu

So now you'll be able to declare your blog language by using the tutorial given above. I hope this article will be helpful, Please leave your comments below.
Site Developed, Designed and Maintained by Rayees Rehman Mir. Copyrights © Rayees Rehman Mir, 2010 - 2016. Best viewed on Firefox and Google Chrome.