Lastest News

recent

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>

Note: "en-US" means English - United States. Simply change it with your language code.

Final result will look like this:





Language Codes Table

afAfrikaanssqAlbanian
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
beBelarusiancaCatalan
zh-twChinese (Taiwan)zh-cnChinese (PRC)
zh-hkChinese (Hong Kong SAR)zh-sgChinese (Singapore)
hrCroatiancsCzech
daDanishnlDutch (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
foFaeroesefaFarsi
fiFinnishfrFrench (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
heHebrewhiHindi
huHungarianisIcelandic
idIndonesianitItalian (Standard)
it-chItalian (Switzerland)jaJapanese
koKoreankoKorean (Johab)
lvLatvianltLithuanian
mkMacedonian (FYROM)msMalaysian
mtMaltesenoNorwegian (Bokmal)
noNorwegian (Nynorsk)plPolish
pt-brPortuguese (Brazil)ptPortuguese (Portugal)
rmRhaeto-RomanicroRomanian
ro-moRomanian (Republic of Moldova)ruRussian
ru-moRussian (Republic of Moldova)szSami (Lappish)
srSerbian (Cyrillic)srSerbian (Latin)
skSlovakslSlovenian
sbSorbianesSpanish (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)
sxSutusvSwedish
sv-fiSwedish (Finland)thThai
tsTsongatnTswana
trTurkishukUkrainian
urUrduveVenda
viVietnamesexhXhosa
jiYiddishzuZulu
How to Add “lang” Attribute to a Blogger Template Reviewed by admin on February 12, 2026 Rating: 5

No comments:

All Rights Reserved by PBSMLINKS -A Complete Information Sharing Portal © 2016 - 2021
Powered By Blogger, Designed by PBSMLINKS

Contact Form

Name

Email *

Message *

Powered by Blogger.