Friday, 16 November 2012

How To Declare Website Language With HTML in Blogger

Do you want to declare a Default Language of your website? When a person is creating an international website, then it is significant 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, we will be learning how a person can declare language of a website with the help of HTML Coding. 

Significant Tips While Declaring Language of a Website:

There are lots of misconceptions in the minds of webmasters that How, when and where should they enter the HTML coding to define their website’s language. Fortunately, W3.ORG has provided detailed information about the whole process. Consider the following tips. 

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

How To Declare Language of 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 Lang attributions his SEO will be improve then he is committing a mistake because it has low Impact on search engine optimization. Furthermore, it will increase the crawling rate because crawlers will be able to fetch your content rather quickly. Follow the instructions mentioned below.

  • According to the prescribed rules by W3C, it’s essential to place the Lang 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 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. Once done, Save the template by pressing Save template button.  
<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'>

ISO 639-1 Language Codes: 

ISO 639-1 is an abbreviation which is used to classify all known languages. Each language has its unique two or three letter. Following is the list of language along with their short codes that can be used as either HTML or XML Lang attributions. 

LanguageISO Code
Abkhazianab
Afaraa
Afrikaansaf
Albaniansq
Amharicam
Arabicar
Aragonesean
Armenianhy
Assameseas
Aymaraay
Azerbaijaniaz
Bashkirba
Basqueeu
Bengali (Bangla)bn
Bhutanidz
Biharibh
Bislamabi
Bretonbr
Bulgarianbg
Burmesemy
Byelorussian (Belarusian)be
Cambodiankm
Catalanca
Cherokee
Chewa
Chinese (Simplified)zh
Chinese (Traditional)zh
Corsicanco
Croatianhr
Czechcs
Danishda
Divehi
Dutchnl
Edo
Englishen
Esperantoeo
Estonianet
Faeroesefo
Farsifa
Fijifj
Finnishfi
Flemish
Frenchfr
Frisianfy
Fulfulde
Galiciangl
Gaelic (Scottish)gd
Gaelic (Manx)gv
Georgianka
Germande
Greekel
Greenlandickl
Guaranign
Gujaratigu
Haitian Creoleht
Hausaha
Hawaiian
Hebrewhe, iw
Hindihi
Hungarianhu
Ibibio
Icelandicis
Idoio
Igbo
Indonesianid, in
Interlinguaia
Interlingueie
Inuktitutiu
Inupiakik
Irishga
Italianit
Japaneseja
Javanesejv
Kannadakn
Kanuri
Kashmiriks
Kazakhkk
Kinyarwanda (Ruanda)rw
Kirghizky
Kirundi (Rundi)rn
Konkani
Koreanko
Kurdishku
Laothianlo
Latinla
Latvian (Lettish)lv
Limburgish ( Limburger)li
Lingalaln
Lithuanianlt
Macedonianmk
Malagasymg
Malayms
Malayalamml
Maltesemt
Maorimi
Marathimr
Moldavianmo
Mongolianmn
Nauruna
Nepaline
Norwegianno
Occitanoc
Oriyaor
Oromo (Afaan Oromo)om
Papiamentu
Pashto (Pushto)ps
Polishpl
Portuguesept
Punjabipa
Quechuaqu
Rhaeto-Romancerm
Romanianro
Russianru
Sami (Lappish)
Samoansm
Sangrosg
Sanskritsa
Serbiansr
Serbo-Croatiansh
Sesothost
Setswanatn
Shonasn
Sichuan Yiii
Sindhisd
Sinhalesesi
Siswatiss
Slovaksk
Sloveniansl
Somaliso
Spanishes
Sundanesesu
Swahili (Kiswahili)sw
Swedishsv
Syriac
Tagalogtl
Tajiktg
Tamazight
Tamilta
Tatartt
Telugute
Thaith
Tibetanbo
Tigrinyati
Tongato
Tsongats
Turkishtr
Turkmentk
Twitw
Uighurug
Ukrainianuk
Urduur
Uzbekuz
Venda
Vietnamesevi
Volapükvo
Wallonwa
Welshcy
Wolofwo
Xhosaxh
Yi
Yiddishyi, ji
Yorubayo
Zuluzu

From the Editor’s Desk:

Now, just think that by doing a small tweak in our template search engines can easily crawl the website. We have implemented the tutorial on this blog and it is working quite brilliantly. What are your thoughts about this tutorial? Take a lot care of yourself till then, Peace, Blessings and Happy Learning.
How To Declare Website Language With HTML in Blogger
4/ 5
By

GET OUR BLOGGING SECRETS DIRECTLY TO YOUR INBOX!

Want access to our blogging secrets,We never shared on our blog.Just enter your email address below to get access to our 3 ultimate guides on how to run a successful blog!

Dear Reader! We’re enthusiastic to see your comment but after reading the Content please ask for advice and to provide constructive feedback Please Write Relevant Comment with Polite Language.Your comments inspired me to continue blogging. Your opinion much more valuable to me.
Let’s enjoy a personal and evocative conversation. Thank You!