Two-letter or three-letter ISO language codes - World Wide ...
文章推薦指數: 80 %
(And for some languages there were even two three-letter alternatives to choose from.) People were sometimes confused about which ISO code they should use in a ... Intendedaudience: HTMLcoders(usingeditorsorscripting),scriptdevelopers(PHP,JSP,etc.),CSScoders,schemadevelopers(DTDs,XMLSchema,RelaxNG,etc.),XSLTdevelopers,Webprojectmanagers,andanyonewhoneedsadviceonusinglanguagetagsinmarkupandstylesheets. Question ShouldIusetwo-letterorthree-letterISOlanguagecodesinlanguagetags? TheInternetandtheWebuseslanguagetagstoindicatethenaturallanguageoftextinprotocolsandformats,suchasHTML,XHTML,XML,HTTP,and others.Inthepast,thelanguagetagvaluesweredefinedbyRFC3066TagsfortheIdentificationof Languages(anditspredecessorRFC1766)andtheybeganwitheitheraISO639-1two-letterlanguagecodeorISO639-2three-lettercode. Forsomelanguagestherewerebothtwo-letterand three-letteralternativesintheISOcodes.(Andforsomelanguagestherewereeventwothree-letteralternativestochoosefrom.)PeopleweresometimesconfusedaboutwhichISOcodetheyshoulduseinalanguagetag. Answer Theanswerisneither! ThecurrentIETFspecificationdescribinghowtocreatelanguagetagsisreferredtoasBCP47.ThisnolongerrefersyoutotheISOcodelists.Insteadyoushouldlookforthe appropriatesubtagsinthenewIANALanguageSubtagRegistry.Thisregistry containsonlyonesubtagperlanguage,sothereisnolongeranyambiguity. AlthoughyounowneedtolookintheIANALanguageSubtagRegistryratherthantheISOcodelists,thelanguagetagsyouhavebeenusing sofardon'tneedtochange(aslongasyoufollowedthe'shortestcode'rule).Thisisjustachangeinhowyouaccessthem. TheIANALanguageSubtagRegistrystilluses,andkeepsuptodatewith,codesfromtheISOstandards,buttheregistrymaintainerstakecarethatthereisjustonesubtagforanylanguage:eitheratwo-letterorathree-lettersubtag. Formoreinformationabouthowtousethenewlanguagetagsyntaxandtheregistry,seethearticlesLanguageTagsinHTMLandXMLandChoosingaLanguageTag. Furtherreading Gettingstarted?LanguageontheWeb Tutorial,WorkingwithlanguageinHTML Relatedlinks,AuthoringHTML&CSS Language Choosinglanguagevalues Relatedlinks,AuthoringXML Language Choosinglanguagevalues Relatedlinks,AuthoringSVG Language Choosinglanguagevalues
延伸文章資訊
- 1ISO 639-2 Language Code List - Library of Congress
- 2Two-letter or three-letter ISO language codes - World Wide ...
(And for some languages there were even two three-letter alternatives to choose from.) People wer...
- 3ISO 2 Letter Language Codes - SitePoint
- 4Language Codes - Sortable by code - Israel Science and ...
- 5ISO 639 2-letter language codes - QuickSilver Translate
2-letter codes are covered by ISO 639-1, and are mostly based on the language name in the local l...