{"id":12932,"date":"2023-02-23T14:39:16","date_gmt":"2023-02-23T19:39:16","guid":{"rendered":"https:\/\/www.med.unc.edu\/webguide\/?page_id=12932"},"modified":"2025-02-04T14:16:03","modified_gmt":"2025-02-04T19:16:03","slug":"alternate-language","status":"publish","type":"page","link":"https:\/\/www.med.unc.edu\/webguide\/accessibility\/alternate-language\/","title":{"rendered":"Alternate Language"},"content":{"rendered":"<p>In html, the <strong>lang<\/strong> attribute is used to specify the language of a web page. This is required for accessibility purposes as it helps to ensure that screen readers will correctly pronounce the content.<\/p>\n<p>All pages in the School of Medicine (SOM) web system are tagged with the English language code. If content in another language is added to the SOM web system, that content needs to be properly tagged. This can be accomplished by adding the <strong>lang<\/strong> attribute to html elements such as paragraph or header tags.<\/p>\n<p><code>&lt;p lang=\"en\"&gt;This is some content.&lt;\/p&gt;<\/code><\/p>\n<p><code>&lt;h2 lang=\"en\"&gt;This is some content.&lt;\/h2&gt;<\/code><\/p>\n<p>For Spanish, the language code is <strong>es<\/strong>. The html would look like this:<\/p>\n<p><code>&lt;p lang=\"es\"&gt;This is some content.&lt;\/p&gt;<\/code><\/p>\n<p>A list of other acceptable language codes can be found on this <a href=\"https:\/\/www.w3schools.com\/tags\/ref_language_codes.asp\">HTML Language Code Reference page<\/a>.<\/p>\n<hr  style=\"margin:40px 0\"class=\" rule-thin osc-rule\" \/>\n<h2>How To<\/h2>\n<p>To view and modify the html of a page, select the <strong>Text<\/strong> tab in the editor and add the <strong>lang<\/strong> attribute to the correct block(s) of text.<\/p>\n<p><a href=\"https:\/\/www.med.unc.edu\/webguide\/wp-content\/uploads\/sites\/419\/2023\/02\/text-tab.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-12946\" src=\"https:\/\/www.med.unc.edu\/webguide\/wp-content\/uploads\/sites\/419\/2023\/02\/text-tab.gif\" alt=\"Screenshot highlighting the location of the text tab in the editor.\" width=\"600\" height=\"106\" \/><\/a><\/p>\n<hr  style=\"margin:40px 0\"class=\" rule-thin osc-rule\" \/>\n<h2>Defining the Language In Documents<\/h2>\n<p>Identifying the language in documents such as PDFs and Word documents is also important and is required to meet accessibility guidelines.<\/p>\n<ul>\n<li><a href=\"https:\/\/www.w3.org\/WAI\/WCAG22\/Techniques\/pdf\/PDF16\">W3C&#8217;s Setting the default language of a PDF document<\/a>.<\/li>\n<li><a href=\"https:\/\/pressbooks.ulib.csuohio.edu\/accessibility\/chapter\/chapter-2-creating-accessible-word-documents\/\">W3C&#8217;s Setting a Title and Language of a Word Document<\/a>.<\/li>\n<li>The University of Washington&#8217;s <a href=\"https:\/\/www.washington.edu\/accessibility\/documents\/language\/\">Language in Documents<\/a> web page shows how to set the language for both pdfs and Word documents.<\/li>\n<li>UNC\u2019s Digital Accessibility Office (DAO) provides documentation and training to help you make your documents accessible. View their <a href=\"https:\/\/digitalaccessibility.unc.edu\/reference\/\">document accessibility checklists<\/a> or sign up for their <a href=\"https:\/\/digitalaccessibility.unc.edu\/training\/\">free document accessibility training<\/a>.<\/li>\n<\/ul>\n<hr  style=\"margin:40px 0\"class=\" rule-thin osc-rule\" \/>\n<h2>References<\/h2>\n<p><a href=\"https:\/\/www.w3.org\/TR\/WCAG21\/#language-of-page\">WCAG Success Criterion 3.1.1<\/a> requires that web pages specify the default language of the page.<\/p>\n<p><a href=\"https:\/\/www.w3.org\/TR\/WCAG21\/#language-of-parts\">WCAG Success Criterion 3.1.2<\/a> requires that pages with parts in different languages have the languages of those parts specified too.<\/p>\n<p><a href=\"https:\/\/webaim.org\/techniques\/language\/\">WebAIM&#8217;s Document and Content Language<\/a> &#8211; there is a great audio recording demonstrating the issues a screen reader has pronouncing English text that has the language attribute of &#8220;cs&#8221; (Czech).<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In html, the lang attribute is used to specify the language of a web page. This is required for accessibility purposes as it helps to ensure that screen readers will correctly pronounce the content. All pages in the School of Medicine (SOM) web system are tagged with the English language code. If content in another &hellip; <a href=\"https:\/\/www.med.unc.edu\/webguide\/accessibility\/alternate-language\/\" aria-label=\"Read more about Alternate Language\">Read more<\/a><\/p>\n","protected":false},"author":3206,"featured_media":0,"parent":9092,"menu_order":7,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"layout":"","cellInformation":"","apiCallInformation":"","footnotes":"","_links_to":"","_links_to_target":""},"class_list":["post-12932","page","type-page","status-publish","hentry","odd"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Alternate Language - Web Guide<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.med.unc.edu\/webguide\/accessibility\/alternate-language\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Alternate Language - Web Guide\" \/>\n<meta property=\"og:description\" content=\"In html, the lang attribute is used to specify the language of a web page. This is required for accessibility purposes as it helps to ensure that screen readers will correctly pronounce the content. All pages in the School of Medicine (SOM) web system are tagged with the English language code. If content in another &hellip; Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.med.unc.edu\/webguide\/accessibility\/alternate-language\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Guide\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-04T19:16:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.med.unc.edu\/webguide\/wp-content\/uploads\/sites\/419\/2023\/02\/text-tab.gif\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"141\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/gif\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.med.unc.edu\/webguide\/accessibility\/alternate-language\/\",\"url\":\"https:\/\/www.med.unc.edu\/webguide\/accessibility\/alternate-language\/\",\"name\":\"Alternate Language - Web Guide\",\"isPartOf\":{\"@id\":\"https:\/\/www.med.unc.edu\/webguide\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.med.unc.edu\/webguide\/accessibility\/alternate-language\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.med.unc.edu\/webguide\/accessibility\/alternate-language\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.med.unc.edu\/webguide\/wp-content\/uploads\/sites\/419\/2023\/02\/text-tab.gif\",\"datePublished\":\"2023-02-23T19:39:16+00:00\",\"dateModified\":\"2025-02-04T19:16:03+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.med.unc.edu\/webguide\/accessibility\/alternate-language\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.med.unc.edu\/webguide\/accessibility\/alternate-language\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.med.unc.edu\/webguide\/accessibility\/alternate-language\/#primaryimage\",\"url\":\"https:\/\/www.med.unc.edu\/webguide\/wp-content\/uploads\/sites\/419\/2023\/02\/text-tab.gif\",\"contentUrl\":\"https:\/\/www.med.unc.edu\/webguide\/wp-content\/uploads\/sites\/419\/2023\/02\/text-tab.gif\",\"width\":800,\"height\":141,\"caption\":\"Screenshot highlighting the location of the text tab in the editor.\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.med.unc.edu\/webguide\/accessibility\/alternate-language\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.med.unc.edu\/webguide\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Digital Accessibility\",\"item\":\"https:\/\/www.med.unc.edu\/webguide\/accessibility\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Alternate Language\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.med.unc.edu\/webguide\/#website\",\"url\":\"https:\/\/www.med.unc.edu\/webguide\/\",\"name\":\"Web Guide\",\"description\":\"School of Medicine IT\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.med.unc.edu\/webguide\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Alternate Language - Web Guide","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.med.unc.edu\/webguide\/accessibility\/alternate-language\/","og_locale":"en_US","og_type":"article","og_title":"Alternate Language - Web Guide","og_description":"In html, the lang attribute is used to specify the language of a web page. This is required for accessibility purposes as it helps to ensure that screen readers will correctly pronounce the content. All pages in the School of Medicine (SOM) web system are tagged with the English language code. If content in another &hellip; Read more","og_url":"https:\/\/www.med.unc.edu\/webguide\/accessibility\/alternate-language\/","og_site_name":"Web Guide","article_modified_time":"2025-02-04T19:16:03+00:00","og_image":[{"width":800,"height":141,"url":"https:\/\/www.med.unc.edu\/webguide\/wp-content\/uploads\/sites\/419\/2023\/02\/text-tab.gif","type":"image\/gif"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.med.unc.edu\/webguide\/accessibility\/alternate-language\/","url":"https:\/\/www.med.unc.edu\/webguide\/accessibility\/alternate-language\/","name":"Alternate Language - Web Guide","isPartOf":{"@id":"https:\/\/www.med.unc.edu\/webguide\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.med.unc.edu\/webguide\/accessibility\/alternate-language\/#primaryimage"},"image":{"@id":"https:\/\/www.med.unc.edu\/webguide\/accessibility\/alternate-language\/#primaryimage"},"thumbnailUrl":"https:\/\/www.med.unc.edu\/webguide\/wp-content\/uploads\/sites\/419\/2023\/02\/text-tab.gif","datePublished":"2023-02-23T19:39:16+00:00","dateModified":"2025-02-04T19:16:03+00:00","breadcrumb":{"@id":"https:\/\/www.med.unc.edu\/webguide\/accessibility\/alternate-language\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.med.unc.edu\/webguide\/accessibility\/alternate-language\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.med.unc.edu\/webguide\/accessibility\/alternate-language\/#primaryimage","url":"https:\/\/www.med.unc.edu\/webguide\/wp-content\/uploads\/sites\/419\/2023\/02\/text-tab.gif","contentUrl":"https:\/\/www.med.unc.edu\/webguide\/wp-content\/uploads\/sites\/419\/2023\/02\/text-tab.gif","width":800,"height":141,"caption":"Screenshot highlighting the location of the text tab in the editor."},{"@type":"BreadcrumbList","@id":"https:\/\/www.med.unc.edu\/webguide\/accessibility\/alternate-language\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.med.unc.edu\/webguide\/"},{"@type":"ListItem","position":2,"name":"Digital Accessibility","item":"https:\/\/www.med.unc.edu\/webguide\/accessibility\/"},{"@type":"ListItem","position":3,"name":"Alternate Language"}]},{"@type":"WebSite","@id":"https:\/\/www.med.unc.edu\/webguide\/#website","url":"https:\/\/www.med.unc.edu\/webguide\/","name":"Web Guide","description":"School of Medicine IT","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.med.unc.edu\/webguide\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links_to":[],"_links_to_target":[],"_links":{"self":[{"href":"https:\/\/www.med.unc.edu\/webguide\/wp-json\/wp\/v2\/pages\/12932","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.med.unc.edu\/webguide\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.med.unc.edu\/webguide\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.med.unc.edu\/webguide\/wp-json\/wp\/v2\/users\/3206"}],"replies":[{"embeddable":true,"href":"https:\/\/www.med.unc.edu\/webguide\/wp-json\/wp\/v2\/comments?post=12932"}],"version-history":[{"count":0,"href":"https:\/\/www.med.unc.edu\/webguide\/wp-json\/wp\/v2\/pages\/12932\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.med.unc.edu\/webguide\/wp-json\/wp\/v2\/pages\/9092"}],"wp:attachment":[{"href":"https:\/\/www.med.unc.edu\/webguide\/wp-json\/wp\/v2\/media?parent=12932"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}