Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

When running multiple international Websites, is the best practice in language tags to specify firstly the language code then the country code, or vice versa?

For instance:

  • http://www.example.com/en-in/ (English, India) or
  • https://www.example.com/in-en/
share|improve this question

2 Answers 2

up vote 6 down vote accepted

The typical format for a locale is comprised of the two letter language code followed by the two letter country code. For example, here is a list of all the locales supported by Java:

Language                       Country               Locale ID
--------------------------------------------------------------
Albanian                       Albania               sq_AL
Arabic                         Algeria               ar_DZ
Arabic                         Bahrain               ar_BH
Arabic                         Egypt                 ar_EG
Arabic                         Iraq                  ar_IQ
Arabic                         Jordan                ar_JO
Arabic                         Kuwait                ar_KW
Arabic                         Lebanon               ar_LB
Arabic                         Libya                 ar_LY
Arabic                         Morocco               ar_MA
Arabic                         Oman                  ar_OM
Arabic                         Qatar                 ar_QA
Arabic                         Saudi Arabia          ar_SA
Arabic                         Sudan                 ar_SD
Arabic                         Syria                 ar_SY
Arabic                         Tunisia               ar_TN
Arabic                         United Arab Emirates  ar_AE
Arabic                         Yemen                 ar_YE
Belarusian                     Belarus               be_BY
Bulgarian                      Bulgaria              bg_BG
Catalan                        Spain                 ca_ES
Chinese (Simplified)           China                 zh_CN
Chinese (Simplified)           Singapore             zh_SG
Chinese (Traditional)          Hong Kong             zh_HK
Chinese (Traditional)          Taiwan                zh_TW
Croatian                       Croatia               hr_HR
Czech                          Czech Republic        cs_CZ
Danish                         Denmark               da_DK
Dutch                          Belgium               nl_BE
Dutch                          Netherlands           nl_NL
English                        Australia             en_AU
English                        Canada                en_CA
English                        India                 en_IN
English                        Ireland               en_IE
English                        Malta                 en_MT
English                        New Zealand           en_NZ
English                        Philippines           en_PH
English                        Singapore             en_SG
English                        South Africa          en_ZA
English                        United Kingdom        en_GB
English                        United States         en_US
Estonian                       Estonia               et_EE
Finnish                        Finland               fi_FI
French                         Belgium               fr_BE
French                         Canada                fr_CA
French                         France                fr_FR
French                         Luxembourg            fr_LU
French                         Switzerland           fr_CH
German                         Austria               de_AT
German                         Germany               de_DE
German                         Luxembourg            de_LU
German                         Switzerland           de_CH
Greek                          Cyprus                el_CY
Greek                          Greece                el_GR
Hebrew                         Israel                iw_IL
Hindi                          India                 hi_IN
Hungarian                      Hungary               hu_HU
Icelandic                      Iceland               is_IS
Indonesian                     Indonesia             in_ID
Irish                          Ireland               ga_IE
Italian                        Italy                 it_IT
Italian                        Switzerland           it_CH
Japanese (Gregorian calendar)  Japan                 ja_JP
Japanese (Imperial calendar)   Japan                 ja_JP_JP
Korean                         South Korea           ko_KR
Latvian                        Latvia                lv_LV
Lithuanian                     Lithuania             lt_LT
Macedonian                     Macedonia             mk_MK
Malay                          Malaysia              ms_MY
Maltese                        Malta                 mt_MT
...

When used on the web, the W3C recommends using a dash rather than an underscore as the canonical form. That document still shows examples with the capitalized language identifier as canonical, but specifies that all lowercase would match. For the purposes of URLs, I would use all lower case with a hyphen.

share|improve this answer

This is the language which dominates because there are many countries which use the same language. That's why, you need to specify to language first and then precise with the country.

Thus, the most appropriate is http://www.example.com/en-in/.

However, there is no impact on SEO, it's just a standard.

For this kind of stuff, you can just take a look how big companies do. For instance, Facebook has URLs like:

  • https://fr-ca.facebook.com (for Canadians who speak French)
  • https://fr-fr.facebook.com (for Frenchmen and Frenchwomen who speak French)
  • https://pt-br.facebook.com (for Brazilians who speak Portuguese)
  • https://pt-pt.facebook.com (for Portuguese men and women who speak Portuguese)
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.