• loading...

How to Add “lang” Attribute to a Blogger Template


- No comments
How to Add “lang” Attribute to a Blogger Template
Adding the "lang" attribute into the html tag specifies the default language of the website's content. Some common lang attributes are "en" for English, "ja" for Japanese, "es" for Spanish, "fr" for France and so on.

To specify your language, go to the "Edit HTML" page of your blog.

Your blog's XML code will start with something like this:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<html 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'>
<head>

Now add lang='en-US' code into the html tag like this:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<html 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'>
<head>
Final result will look like this:

Language Codes Table
afAfrikaans sqAlbanian
ar-saArabic (Saudi Arabia) ar-iqArabic (Iraq)
ar-egArabic (Egypt) ar-lyArabic (Libya)
ar-dzArabic (Algeria) ar-maArabic (Morocco)
ar-tnArabic (Tunisia) ar-omArabic (Oman)
ar-yeArabic (Yemen) ar-syArabic (Syria)
ar-joArabic (Jordan) ar-lbArabic (Lebanon)
ar-kwArabic (Kuwait) ar-aeArabic (U.A.E.)
ar-bhArabic (Bahrain) ar-qaArabic (Qatar)
euBasque (Basque)bgBulgarian
beBelarusian caCatalan
zh-twChinese (Taiwan) zh-cnChinese (PRC)
zh-hkChinese (Hong Kong SAR) zh-sgChinese (Singapore)
hrCroatian csCzech
daDanish nlDutch (Standard)
nl-beDutch (Belgium) enEnglish
en-usEnglish (United States) en-gbEnglish (United Kingdom)
en-auEnglish (Australia) en-caEnglish (Canada)
en-nzEnglish (New Zealand) en-ieEnglish (Ireland)
en-zaEnglish (South Africa) en-jmEnglish (Jamaica)
enEnglish (Caribbean) en-bzEnglish (Belize)
en-ttEnglish (Trinidad) etEstonian
foFaeroese faFarsi
fiFinnish frFrench (Standard)
fr-beFrench (Belgium) fr-caFrench (Canada)
fr-chFrench (Switzerland) fr-luFrench (Luxembourg)
gdGaelic (Scotland) gaIrish
deGerman (Standard) de-chGerman (Switzerland)
de-atGerman (Austria) de-luGerman (Luxembourg)
de-liGerman (Liechtenstein) elGreek
heHebrew hiHindi
huHungarian isIcelandic
idIndonesian itItalian (Standard)
it-chItalian (Switzerland) jaJapanese
koKorean koKorean (Johab)
lvLatvian ltLithuanian
mkMacedonian (FYROM)msMalaysian
mtMaltese noNorwegian (Bokmal)
noNorwegian (Nynorsk) plPolish
pt-brPortuguese (Brazil) ptPortuguese (Portugal)
rmRhaeto-Romanic roRomanian
ro-moRomanian (Republic of Moldova) ruRussian
ru-moRussian (Republic of Moldova) szSami (Lappish)
srSerbian (Cyrillic) srSerbian (Latin)
skSlovak slSlovenian
sbSorbian esSpanish (Spain)
es-mxSpanish (Mexico) es-gtSpanish (Guatemala)
es-crSpanish (Costa Rica) es-paSpanish (Panama)
es-doSpanish (Dominican Republic) es-veSpanish (Venezuela)
es-coSpanish (Colombia) es-peSpanish (Peru)
es-arSpanish (Argentina) es-ecSpanish (Ecuador)
es-clSpanish (Chile) es-uySpanish (Uruguay)
es-pySpanish (Paraguay) es-boSpanish (Bolivia)
es-svSpanish (El Salvador) es-hnSpanish (Honduras)
es-niSpanish (Nicaragua) es-prSpanish (Puerto Rico)
sxSutu svSwedish
sv-fiSwedish (Finland) thThai
tsTsonga tnTswana
trTurkish ukUkrainian
urUrdu veVenda
viVietnamese xhXhosa
jiYiddish zuZulu

This is it. You are done. If you liked this article “How to Add “lang” Attribute to a Blogger Template” then please share it and write comments as your feedback.

No comments :

Post a Comment