How To Declare Website Language With HTML in Blogger

Advertisements
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.
Advertisements

The Editorial Team of MyBloggerLab consists of a group of Professional Blogger geeks Led by Syed Faizan Ali (Founder of MyBloggerLab).

Comment With:
OR
Choose Wisely!

15 comments

November 16, 2012 at 11:21 AM

Faizan please add live demo option

Editorial Team MOD
November 16, 2012 at 11:24 AM

Dude its not a widget. So We can't add a Demo to this tutorial. It is a Small HTML Tip that allows you to define the language of your site that which language you are using in your Articles. For example we are using English then we will use lang="en-US" to help search engine and Browsers. Hope that Helps. Peace

November 16, 2012 at 1:12 PM

I know it's not a widget, but you can add this feature in test blog to show how it works, it will help new bloggers what actually it is.

Editorial Team MOD
November 16, 2012 at 5:09 PM

Well Dude, its just a simple LANG HTML Tip. It can't be shown in a whole new demo. Hope that answers your question.

November 17, 2012 at 1:11 AM

bro nyc post but you added some changes in header and sidebar but bro the old look is better ! :) anyway thnx for this :)

November 17, 2012 at 2:06 AM

please tell how to label images with My Blogger Lab tag!

November 18, 2012 at 7:22 AM

hi bro one info ! template like your site check :(

main link: http://lordhtml.blogspot.in/2012/11/laboratory-thesis-seo-blogger-template.html

demo : http://laboratory-theme.blogspot.in/

December 6, 2012 at 9:22 AM

Yay..!! Thank you for this code and tutorials. I already implemented this on my Blog.

December 6, 2012 at 9:24 AM

Hey..!! Syed..!!

How is it differ from this code "<meta content='english' name='language'/>"?

Editorial Team MOD
December 6, 2012 at 11:48 AM

The Code Seems to be Fine. You can also use it But I Would Recommend you to Use Short code EN Instead of Full "ENGLISH" Hope that Helps. Peace

December 8, 2012 at 2:02 AM

Thank you Syed for the tips..

December 28, 2013 at 11:02 AM

I think WAJAHAT AHMED is being funny !

December 28, 2013 at 11:05 AM

DO Both , the meta Attribute and this , in the tutorial . Do both to fully declare the Language !

December 28, 2013 at 11:05 AM

Excellent tutorial Admin !
Wahh !

May 29, 2016 at 12:38 AM

Great tips, thank you very much!

Post a Comment

We’re eager to see your comment. However, Please Keep in mind that all comments are moderated manually by our human reviewers according to our comment policy, and all the links are nofollow. Using Keywords in the name field area is forbidden. Let’s enjoy a personal and evocative conversation.

Helping You to do Cool Things With Blogger Since 2012™.

© Copyright 2012 - 2016. MBL Networks, All Rights are Strictly Reserved.