Tag content with international language codes - GOV.UK
文章推薦指數: 80 %
Use the World Wide Web Consortium (W3C) guidance to: show you how to annotate language on the web, for both HTML and XML formats; declare the ... Skiptomaincontent CookiesonGOV.UK Weusesomeessentialcookiestomakethiswebsitework. We’dliketosetadditionalcookiestounderstandhowyouuseGOV.UK,rememberyoursettingsandimprovegovernmentservices. Wealsousecookiessetbyothersitestohelpusdelivercontentfromtheirservices. Acceptadditionalcookies Rejectadditionalcookies Viewcookies Youcanchangeyourcookiesettingsatanytime. Hidethismessage Coronavirus(COVID-19) Latestupdatesandguidance Home Government Governmentefficiency,transparencyandaccountability Openstandardsforgovernment CabinetOffice CentralDigital&DataOffice Contents 1.Summaryofthestandard’suseforgovernment 2.Howthisstandardmeetsuserneeds 3.Howtousethestandard Printthispage ©Crowncopyright2020 ThispublicationislicensedunderthetermsoftheOpenGovernmentLicencev3.0exceptwhereotherwisestated.Toviewthislicence,visitnationalarchives.gov.uk/doc/open-government-licence/version/3orwritetotheInformationPolicyTeam,TheNationalArchives,Kew,LondonTW94DU,oremail:[email protected]. Wherewehaveidentifiedanythirdpartycopyrightinformationyouwillneedtoobtainpermissionfromthecopyrightholdersconcerned. Thispublicationisavailableathttps://www.gov.uk/government/publications/open-standards-for-government/language-tags UsetheISO639-1:2002languagecodesstandardtoaddconsistent,internationallyrecognisedlanguagecodestoyourdata. 1.Summaryofthestandard’suseforgovernment TheISO639-1standarduses2lettercodestorepresentthenamesofmorethan500internationallyrecognisedlanguages.Itdoesnotrepresentlanguagesthatareexclusivelyformachines.Usethisstandardtomakesureyoureferencelanguagesinaconsistentwayacrossyourdatasets. ThegovernmentchoosesstandardsusingtheopenstandardsapprovalprocessandtheOpenStandardsBoardhasfinalapproval.Readmoreabouttheprocessforlanguagecodes. 2.Howthisstandardmeetsuserneeds Usethisstandardforconsistentlanguagetagging.Forexample,whenusingcross-platformcharacterencodingtomakesuredifferentsystemscorrectlyidentifylanguages. Whensystemscanconsistentlyidentifywhichlanguagesyou’veuseditcanhelpuserswho: wanttotradewithUKbusinesses plantotraveltotheUKfromabroad liveintheUKbutdonotspeakEnglish ThegovernmentalsohasalegalrequirementtotranslateinformationintoWelsh.Thisstandardprovidesaconsistentwayoftaggingthisinformationsoit’seasiertofind. Usingthisstandardmeans: userscanfindinformationinthelanguagetheyneed servicesandcontenthaveconsistentlanguagetags screenreaderscanidentifywhichlanguagethecontentisin 3.Howtousethestandard Whenyou’republishingcontentinmultiplelanguagesyoumustusethisstandard’s2lettercodesinthetagsormetadata. YoumustuselanguagetagsintherelevantHTMLandXMLdocumentmetadata. Thisstandardsdoesnotcover: standardmethodsforattachinglanguagetagstootherformats,suchasJSON methodsofpresentingauserwithtext,inparticular,HTTPlanguagenegotiationortheURLsuffixschemecurrentlyusedbyGOV.UK UsetheWorldWideWebConsortium(W3C)guidanceto: showyouhowtoannotatelanguageontheweb,forbothHTMLandXMLformats declarethelanguageofawebpageoraportionofawebpageusingHTMLlangattribute declarethelanguageofabodyoftextusingthe‘xml:lang’attribute Youcanalsogetalistof: 2and3letterlanguagetagsontheInternetAssignedNumbersAuthority(IANA)website extendedlanguagetagswithscriptsubtagsinRFC5646,ifyouneedtoaddinformationtothelanguagetag tagsandtheircountrynamesontheUSlibraryofcongresswebsite Contents Printthispage Isthispageuseful? Maybe Yesthispageisuseful Nothispageisnotuseful Thankyouforyourfeedback Reportaproblemwiththispage Close HelpusimproveGOV.UK Don’tincludepersonalorfinancialinformationlikeyourNationalInsurancenumberorcreditcarddetails. Whatwereyoudoing? Whatwentwrong? Send Close HelpusimproveGOV.UK TohelpusimproveGOV.UK,we’dliketoknowmoreaboutyourvisittoday.We’llsendyoualinktoafeedbackform.Itwilltakeonly2minutestofillin.Don’tworrywewon’tsendyouspamorshareyouremailaddresswithanyone. Emailaddress Sendmethesurvey
延伸文章資訊
- 1HTML ISO Language Codes - W3docs
The HTML lang attribute declares the language of a web page or only a part of a web page. It is u...
- 2ISO 639 語言代碼... - Ian 懶惰蟲筆記| 輕鬆健身去-2021年10月
國家語言代碼 · language code中文 · 語系縮寫 · iso 639-1 · ISO 639 · 繁體中文zh · 語系代碼 · 網頁語系代碼. W3C - Language co...
- 3HTML ISO Language Code Reference
According to the W3C recommendation you should declare the primary language for each Web page wit...
- 4HTML - Wikipedia
The HyperText Markup Language, or HTML is the standard markup language for documents ... The Worl...
- 58 Language information and text direction
Inheritance of language codes