var g = { } var base = '/i18n-drafts/' if (window.location.href.match('www.w3.org')) { base = 'https://www.w3.org/International/i18n-drafts/' } // LANGUAGE RELATED STUFF g.nativeText = { 'ar':'عربي', 'bg':'Български', 'de':'Deutsch', 'da':'Dansk', 'el':'Ελληνικά', 'en':'English', 'es':'Español', 'fr':'Français', 'gl':'Galego', 'he':'עברית', 'hi':'हिन्दी', 'hu':'Magyar', 'it':'Italiano', 'ja':'日本語', 'ko':'한국어', 'nl':'Nederlands', 'pl':'Polski', 'pt':'Português', 'pt-br':'Português-BR', 'ro':'Română', 'ru':'Pусский', 'sv':'Svenska', 'th':'ไทย', 'tr':'Türkçe', 'uk':'Українська', 'vi':'Tiếng Anh', 'zh-hans':'简体中文', 'zh-hant':'繁體中文' } //f.clang = document.querySelector('html').lang if (f.clang != 'en') { g.isTranslation = true } else { g.isTranslation = false } // COOKIE // when clicking on a language selector, ask the user if they want to set cookie to remember that language - cookie is read by /International/.htaccess function showExample (path) { var exampleWindow = window.open(path, 'exampleWindow'); exampleWindow.focus(); } function stickyConneg (filename, cLang, targetLang) { var response = false var msg = '['+cLang+'] '+cn[cLang] msg += '\n\n'+'['+targetLang+'] '+cn[targetLang] if (targetLang !== 'en' && cLang !== 'en') msg += '\n\n'+'[en] '+cn.en response = confirm(msg) if (response == true) { var d = new Date() d.setTime(d.getTime() + 60*24*60*60*1000) var expires = ';expires='+d.toUTCString() var path = ";path=/" document.cookie = 'w3ci18nlang='+targetLang+expires+path } document.location.assign(filename+'.'+targetLang+'.html') } // MAIN NAVIGATION g.siteSearch = '
' g.breadcrumbs = ""+s.home+" > "+s.resources+" > " if (f.breadcrumb == 'tests') g.breadcrumbs += ""+s.tests+"" else g.breadcrumbs += ""+s.articles+"" if (f.status !== 'published' && f.status !== 'notreviewed') g.about = "

"+s.aboutThisArticle+"

\n" else g.about = '' if (f.status == "draft") { g.about += "

"+s.status_draft+"

" } if (f.status == "review") { g.about += "

"+s.status_review+"

" } //if (f.status == "published") { g.about += "

"+s.status_published+"

" } //if (f.status == "notreviewed") { g.about += "

"+s.status_notreviewed+"

" } if (f.status == "obsolete") { g.about += "

"+s.status_obsolete+"

" } var fontlink = '' var versionList = '' if (trans.versions && !(trans.versions[0] == f.clang && trans.versions.length == 1) ) { versionList = '

' for (lang=0; lang'+g.nativeText[trans.versions[lang]]+''+s.rlm+' '; if (lang < trans.versions.length-1) versionList += '•  ' } } versionList += '

'; } if (g.isTranslation) g.disclaimer = '

'+s.translationDisclaimer+'

'+s.translatedBy+f.translators+'

' else g.disclaimer = '' var mainNavigation = ''+ ' '+ ' '+ //'
 
'+ ' ' // UPDATES var outOfDateTranslation = false if (trans.outofdatetranslations.length > 0) { for (var lang in trans.outofdatetranslations) { if (f.clang == trans.outofdatetranslations[lang]) { outOfDateTranslation = true break } } } var unlinkedTranslation = false if (trans.unlinkedtranslations.length > 0) { for (var lang in trans.unlinkedtranslations) { if (f.clang == trans.unlinkedtranslations[lang]) { unlinkedTranslation = true break } } } var updatedTranslation = false if (trans.updatedtranslations.length > 0) { for (var lang in trans.updatedtranslations) { if (f.clang == trans.updatedtranslations[lang]) { updatedTranslation = true break } } } g.updated = '' if (! g.isTranslation && f.firstPubDate && f.lastSubstUpdate && f.firstPubDate != f.lastSubstUpdate) { g.updated = "

"+s.updated+"

" } if (outOfDateTranslation) g.updated += "

"+s.untranslatedChanges+"

" else if (unlinkedTranslation) g.updated += "

"+s.unlinkedTranslation+"

" else if (g.isTranslation && updatedTranslation) {g.updated ="

"+s.translation_updated+"

" } // put a redirect or warning banner on articles on github if (f.status === 'draft') { g.updated += '

NOTE!   This article is in development and is using a temporary URL. It is not safe to refer to it or use the information it contains.

' } if (f.status === 'review') { g.updated += '

NOTE!   This article is currently out for public review. If you have comments, please send them using the Leave a Comment link near the bottom of this page. The published version of the article will be at a different URL, and should be linked to there.

' } if (f.status === 'published' && window.location.href.match('w3c.github.io')) { g.updated += '

'+s.githubRedirect+'

' } // SURVEY var body = window.location.href var qm = body.search(/\?/) if (qm > 0) body = body.substr(0,qm) body = encodeURIComponent('[source] ('+body+') ['+f.clang+']') var title = '['+f.directory+f.filename+'] %20BRIEF_TITLE_GOES_HERE' g.survey = '

'+s.tellUsWhatYouThink+'

'+ '

'+s.sendAComment+'

'+ '

'+s.followOurNews+'

'+ `

‎@webi18n@w3c.social

`+ `

‎@webi18n

`+ '

 RSS

' // BOTTOM OF PAGE g.dateStamp = '' if (g.isTranslation) g.dateStamp = ''+s.translatedFromEnglishVer+'' else g.dateStamp = "Content first published . Last substantive update . This version "; var previousCredit = '' if (f.previousauthors && f.previousauthors != '') previousCredit = ' '+s.previousAuthors+' '+f.previousauthors+s.sentenceDelimiter var modCredit = '' if (f.modifiers && f.modifiers != '') modCredit = s.modifiedBy+f.modifiers+s.sentenceDelimiter var translatorCredit = '' if (g.isTranslation) translatorCredit = s.translatedBy+f.translators+s.sentenceDelimiter var credits = "

"+s.author+f.authors+s.sentenceDelimiter+' '+previousCredit+modCredit+translatorCredit+"

" // Remove the space for Chinese if (document.documentElement.lang === "zh-hans" || document.documentElement.lang === "zh-hant") credits = "

"+s.author+f.authors+s.sentenceDelimiter+' '+previousCredit+modCredit+translatorCredit+"

" if (f.contributors && f.contributors != '') credits += "

"+s.acknowledgements+f.contributors+"

" if (f.sources && f.sources != '') credits += "

"+f.sources+"

" var copyright = "Copyright "+ "© "+dt.copyrightYear+" W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. "+ "W3C liability, trademark, "+ "document use"+ " and software licensing rules apply. "+ "Your interactions with this site are in accordance with our public and "+ "Member privacy statements."; g.bottomOfPage = '' // COMPLETE PAGE function completePage () { var sidebarExtras = '' if (document.getElementById('sidebarExtras')) sidebarExtras = document.getElementById('sidebarExtras').innerHTML document.getElementById('relatedlinks').innerHTML = sidebarExtras //fillinTranslations() if (document.getElementById("toclocation")) createtoc(true); getURLs() } function fillinTranslations () { if (g.isTranslation) { if (document.getElementById('intendedAudience')) document.getElementById('intendedAudience').textContent = s.intendedAudience if (document.getElementById('question')) document.getElementById('question').firstChild.textContent = s.question if (document.getElementById('answer')) document.getElementById('answer').firstChild.textContent = s.answer if (document.getElementById('quickanswer')) document.getElementById('quickanswer').firstChild.textContent = s.quickanswer if (document.getElementById('details')) document.getElementById('details').firstChild.textContent = s.details if (document.getElementById('additionalinfo')) document.getElementById('additionalinfo').firstChild.textContent = s.additionalinfo if (document.getElementById('bytheway')) document.getElementById('bytheway').firstChild.textContent = s.byTheWay if (document.getElementById('endlinks') && document.getElementById('endlinks').firstChild) document.getElementById('endlinks').firstChild.textContent = s.furtherReading } } function getURLs () { // makes a list of URLs and adds footnote markers and footnotes to the bottom of the page // this is revealed only when printing, and applies only to a tags with class print var links = document.querySelectorAll('a.print') var out = '

Links in this document:

    \n' for (var l=0;l\n' } out += '
' var container = document.createElement('section') container.id = "printLinks" container.innerHTML = out if (document.querySelector('#endlinks')) document.querySelector('#endlinks').parentNode.appendChild(container) }