CINXE.COM
User:Trappist the monk/IANA subtag registry file update - Wikipedia
<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-toc-available" lang="en" dir="ltr"> <head> <meta charset="UTF-8"> <title>User:Trappist the monk/IANA subtag registry file update - Wikipedia</title> <script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-toc-available";var cookie=document.cookie.match(/(?:^|; )enwikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy", "wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"9eacec49-a063-4ed0-a596-1912ba9793c7","wgCanonicalNamespace":"User","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":2,"wgPageName":"User:Trappist_the_monk/IANA_subtag_registry_file_update","wgTitle":"Trappist the monk/IANA subtag registry file update","wgCurRevisionId":1234088430,"wgRevisionId":1234088430,"wgArticleId":65443591,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":[],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"User:Trappist_the_monk/IANA_subtag_registry_file_update","wgRelevantArticleId":65443591,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgRelevantUserName":"Trappist the monk","wgNoticeProject":"wikipedia", "wgCiteReferencePreviewsActive":false,"wgFlaggedRevsParams":{"tags":{"status":{"levels":1}}},"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":false,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":40000,"wgRelatedArticlesCompat":[],"wgCentralAuthMobileDomain":false,"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"],"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":false,"wgGEStructuredTaskRejectionReasonTextInputEnabled":false,"wgGELevelingUpEnabledForUser":false};RLSTATE={ "ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","ext.pygments":"ready","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["ext.pygments.view","site","mediawiki.page.ready","mediawiki.toc","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.gadget.ReferenceTooltips","ext.gadget.switcher","ext.urlShortener.toolbar","ext.centralauth.centralautologin","ext.popups","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.interface","ext.cx.eventlogging.campaigns","ext.checkUser.clientHints"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=en&modules=ext.pygments%2CwikimediaBadges%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediamessages.styles%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles&only=styles&skin=vector-2022"> <script async="" src="/w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=en&modules=site.styles&only=styles&skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.4"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="noindex,follow,max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="User:Trappist the monk/IANA subtag registry file update - Wikipedia"> <meta property="og:type" content="website"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//en.m.wikipedia.org/wiki/User:Trappist_the_monk/IANA_subtag_registry_file_update"> <link rel="alternate" type="application/x-wiki" title="Edit this page" href="/w/index.php?title=User:Trappist_the_monk/IANA_subtag_registry_file_update&action=edit"> <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"> <link rel="icon" href="/static/favicon/wikipedia.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Wikipedia (en)"> <link rel="EditURI" type="application/rsd+xml" href="//en.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://en.wikipedia.org/wiki/User:Trappist_the_monk/IANA_subtag_registry_file_update"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en"> <link rel="alternate" type="application/atom+xml" title="Wikipedia Atom feed" href="/w/index.php?title=Special:RecentChanges&feed=atom"> <link rel="dns-prefetch" href="//meta.wikimedia.org" /> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-2 ns-subject mw-editable page-User_Trappist_the_monk_IANA_subtag_registry_file_update rootpage-User_Trappist_the_monk skin-vector-2022 action-view"><a class="mw-jump-link" href="#bodyContent">Jump to content</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="Main menu" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">Main menu</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">Main menu</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">hide</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> Navigation </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/Main_Page" title="Visit the main page [z]" accesskey="z"><span>Main page</span></a></li><li id="n-contents" class="mw-list-item"><a href="/wiki/Wikipedia:Contents" title="Guides to browsing Wikipedia"><span>Contents</span></a></li><li id="n-currentevents" class="mw-list-item"><a href="/wiki/Portal:Current_events" title="Articles related to current events"><span>Current events</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Special:Random" title="Visit a randomly selected article [x]" accesskey="x"><span>Random article</span></a></li><li id="n-aboutsite" class="mw-list-item"><a href="/wiki/Wikipedia:About" title="Learn about Wikipedia and how it works"><span>About Wikipedia</span></a></li><li id="n-contactpage" class="mw-list-item"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us" title="How to contact Wikipedia"><span>Contact us</span></a></li> </ul> </div> </div> <div id="p-interaction" class="vector-menu mw-portlet mw-portlet-interaction" > <div class="vector-menu-heading"> Contribute </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-help" class="mw-list-item"><a href="/wiki/Help:Contents" title="Guidance on how to use and edit Wikipedia"><span>Help</span></a></li><li id="n-introduction" class="mw-list-item"><a href="/wiki/Help:Introduction" title="Learn how to edit Wikipedia"><span>Learn to edit</span></a></li><li id="n-portal" class="mw-list-item"><a href="/wiki/Wikipedia:Community_portal" title="The hub for editors"><span>Community portal</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Special:RecentChanges" title="A list of recent changes to Wikipedia [r]" accesskey="r"><span>Recent changes</span></a></li><li id="n-upload" class="mw-list-item"><a href="/wiki/Wikipedia:File_upload_wizard" title="Add images or other media for use on Wikipedia"><span>Upload file</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/Main_Page" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/wikipedia.png" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="Wikipedia" src="/static/images/mobile/copyright/wikipedia-wordmark-en.svg" style="width: 7.5em; height: 1.125em;"> <img class="mw-logo-tagline" alt="The Free Encyclopedia" src="/static/images/mobile/copyright/wikipedia-tagline-en.svg" width="117" height="13" style="width: 7.3125em; height: 0.8125em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/Special:Search" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="Search Wikipedia [f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Search</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="Search Wikipedia" aria-label="Search Wikipedia" autocapitalize="sentences" title="Search Wikipedia [f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:Search"> </div> <button class="cdx-button cdx-search-input__end-button">Search</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="Personal tools"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Change the appearance of the page's font size, width, and color" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="Appearance" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">Appearance</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_en.wikipedia.org&uselang=en" class=""><span>Donate</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:CreateAccount&returnto=User%3ATrappist+the+monk%2FIANA+subtag+registry+file+update" title="You are encouraged to create an account and log in; however, it is not mandatory" class=""><span>Create account</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:UserLogin&returnto=User%3ATrappist+the+monk%2FIANA+subtag+registry+file+update" title="You're encouraged to log in; however, it's not mandatory. [o]" accesskey="o" class=""><span>Log in</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out" title="Log in and more options" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="Personal tools" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">Personal tools</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="User menu" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_en.wikipedia.org&uselang=en"><span>Donate</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:CreateAccount&returnto=User%3ATrappist+the+monk%2FIANA+subtag+registry+file+update" title="You are encouraged to create an account and log in; however, it is not mandatory"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Create account</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:UserLogin&returnto=User%3ATrappist+the+monk%2FIANA+subtag+registry+file+update" title="You're encouraged to log in; however, it's not mandatory. [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Log in</span></a></li> </ul> </div> </div> <div id="p-user-menu-anon-editor" class="vector-menu mw-portlet mw-portlet-user-menu-anon-editor" > <div class="vector-menu-heading"> Pages for logged out editors <a href="/wiki/Help:Introduction" aria-label="Learn more about editing"><span>learn more</span></a> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/Special:MyContributions" title="A list of edits made from this IP address [y]" accesskey="y"><span>Contributions</span></a></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Special:MyTalk" title="Discussion about edits from this IP address [n]" accesskey="n"><span>Talk</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> <div class="vector-sticky-pinned-container"> <nav id="mw-panel-toc" aria-label="Contents" data-event-name="ui.sidebar-toc" class="mw-table-of-contents-container vector-toc-landmark"> <div id="vector-toc-pinned-container" class="vector-pinned-container"> <div id="vector-toc" class="vector-toc vector-pinnable-element"> <div class="vector-pinnable-header vector-toc-pinnable-header vector-pinnable-header-pinned" data-feature-name="toc-pinned" data-pinnable-element-id="vector-toc" > <h2 class="vector-pinnable-header-label">Contents</h2> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-toc.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-toc.unpin">hide</button> </div> <ul class="vector-toc-contents" id="mw-panel-toc-list"> <li id="toc-mw-content-text" class="vector-toc-list-item vector-toc-level-1"> <a href="#" class="vector-toc-link"> <div class="vector-toc-text">(Top)</div> </a> </li> <li id="toc-settings_file" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#settings_file"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>settings file</span> </div> </a> <ul id="toc-settings_file-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-c#_module" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#c#_module"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>c# module</span> </div> </a> <ul id="toc-c#_module-sublist" class="vector-toc-list"> </ul> </li> </ul> </div> </div> </nav> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <nav aria-label="Contents" class="vector-toc-landmark"> <div id="vector-page-titlebar-toc" class="vector-dropdown vector-page-titlebar-toc vector-button-flush-left" > <input type="checkbox" id="vector-page-titlebar-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-titlebar-toc" class="vector-dropdown-checkbox " aria-label="Toggle the table of contents" > <label id="vector-page-titlebar-toc-label" for="vector-page-titlebar-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">Toggle the table of contents</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-titlebar-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-namespace">User</span><span class="mw-page-title-separator">:</span><span class="mw-page-title-main">Trappist the monk/IANA subtag registry file update</span></h1> <div id="p-lang-btn" class="vector-dropdown mw-portlet mw-portlet-lang" > <input type="checkbox" id="p-lang-btn-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-lang-btn" class="vector-dropdown-checkbox mw-interlanguage-selector" aria-label="This article exist only in this language. Add the article for other languages" > <label id="p-lang-btn-label" for="p-lang-btn-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive mw-portlet-lang-heading-0" aria-hidden="true" ><span class="vector-icon mw-ui-icon-language-progressive mw-ui-icon-wikimedia-language-progressive"></span> <span class="vector-dropdown-label-text">Add languages</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> <div class="after-portlet after-portlet-lang"><span class="uls-after-portlet-link"></span></div> </div> </div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="Namespaces"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-user" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/User:Trappist_the_monk/IANA_subtag_registry_file_update" title="View the user page [c]" accesskey="c"><span>User page</span></a></li><li id="ca-talk" class="new vector-tab-noicon mw-list-item"><a href="/w/index.php?title=User_talk:Trappist_the_monk/IANA_subtag_registry_file_update&action=edit&redlink=1" rel="discussion" class="new" title="Discuss improvements to the content page (page does not exist) [t]" accesskey="t"><span>Talk</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown emptyPortlet" > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="Change language variant" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">English</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="Views"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/User:Trappist_the_monk/IANA_subtag_registry_file_update"><span>Read</span></a></li><li id="ca-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=User:Trappist_the_monk/IANA_subtag_registry_file_update&action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=User:Trappist_the_monk/IANA_subtag_registry_file_update&action=history" title="Past revisions of this page [h]" accesskey="h"><span>View history</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="Tools" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">Tools</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">Tools</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">hide</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="More options" > <div class="vector-menu-heading"> Actions </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="selected vector-more-collapsible-item mw-list-item"><a href="/wiki/User:Trappist_the_monk/IANA_subtag_registry_file_update"><span>Read</span></a></li><li id="ca-more-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=User:Trappist_the_monk/IANA_subtag_registry_file_update&action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=User:Trappist_the_monk/IANA_subtag_registry_file_update&action=history"><span>View history</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> General </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Special:WhatLinksHere/User:Trappist_the_monk/IANA_subtag_registry_file_update" title="List of all English Wikipedia pages containing links to this page [j]" accesskey="j"><span>What links here</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Special:RecentChangesLinked/User:Trappist_the_monk/IANA_subtag_registry_file_update" rel="nofollow" title="Recent changes in pages linked from this page [k]" accesskey="k"><span>Related changes</span></a></li><li id="t-contributions" class="mw-list-item"><a href="/wiki/Special:Contributions/Trappist_the_monk" title="A list of contributions by this user"><span>User contributions</span></a></li><li id="t-log" class="mw-list-item"><a href="/wiki/Special:Log/Trappist_the_monk" title="A list of logged actions by this user"><span>User logs</span></a></li><li id="t-userrights" class="mw-list-item"><a href="/wiki/Special:UserRights/Trappist_the_monk"><span>View user groups</span></a></li><li id="t-upload" class="mw-list-item"><a href="/wiki/Wikipedia:File_Upload_Wizard" title="Upload files [u]" accesskey="u"><span>Upload file</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Special:SpecialPages" title="A list of all special pages [q]" accesskey="q"><span>Special pages</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=User:Trappist_the_monk/IANA_subtag_registry_file_update&oldid=1234088430" title="Permanent link to this revision of this page"><span>Permanent link</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=User:Trappist_the_monk/IANA_subtag_registry_file_update&action=info" title="More information about this page"><span>Page information</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Special:UrlShortener&url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FUser%3ATrappist_the_monk%2FIANA_subtag_registry_file_update"><span>Get shortened URL</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Special:QrCode&url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FUser%3ATrappist_the_monk%2FIANA_subtag_registry_file_update"><span>Download QR code</span></a></li> </ul> </div> </div> <div id="p-coll-print_export" class="vector-menu mw-portlet mw-portlet-coll-print_export" > <div class="vector-menu-heading"> Print/export </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="coll-download-as-rl" class="mw-list-item"><a href="/w/index.php?title=Special:DownloadAsPdf&page=User%3ATrappist_the_monk%2FIANA_subtag_registry_file_update&action=show-download-screen" title="Download this page as a PDF file"><span>Download as PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="/w/index.php?title=User:Trappist_the_monk/IANA_subtag_registry_file_update&printable=yes" title="Printable version of this page [p]" accesskey="p"><span>Printable version</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects emptyPortlet" > <div class="vector-menu-heading"> In other projects </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">Appearance</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">hide</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div class="mw-indicators"> </div> <div id="siteSub" class="noprint">From Wikipedia, the free encyclopedia</div> </div> <div id="contentSub"><div id="mw-content-subtitle"></div></div> <div id="mw-content-text" class="mw-body-content"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><p><a href="/wiki/Module:Lang" title="Module:Lang">Module:Lang</a> relies upon a series of Lua data modules that are transcribed from the IANA <a rel="nofollow" class="external text" href="https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry">language-subtag-registry file</a>: </p> <ul><li><a href="/wiki/Module:Lang/data/iana_languages" title="Module:Lang/data/iana languages">Module:Lang/data/iana languages</a></li> <li><a href="/wiki/Module:Lang/data/iana_scripts" title="Module:Lang/data/iana scripts">Module:Lang/data/iana scripts</a></li> <li><a href="/wiki/Module:Lang/data/iana_regions" title="Module:Lang/data/iana regions">Module:Lang/data/iana regions</a></li> <li><a href="/wiki/Module:Lang/data/iana_variants" title="Module:Lang/data/iana variants">Module:Lang/data/iana variants</a></li> <li><a href="/wiki/Module:Lang/data/iana_suppressed_scripts" title="Module:Lang/data/iana suppressed scripts">Module:Lang/data/iana suppressed scripts</a></li> <li><a href="/wiki/Module:ISO_639_name/ISO_639-1" title="Module:ISO 639 name/ISO 639-1">Module:ISO 639 name/ISO 639-1</a></li></ul> <p>All of these modules can be updated by using <a href="/wiki/Module:Lang/data/iana_languages/make" title="Module:Lang/data/iana languages/make">Module:Lang/data/iana_languages/make</a> and copy/pasting the appropriate sections of that module's output into the related data module. This is a crude awb script that can be used to update all of the data modules in a more 'automatic' manner. The script fetches the language-subtag-registry file from the IANA website and then parses it apart and updates the various modules. </p><p>The process is: </p> <ol><li>open awb and load the settings file.</li> <li>click start</li> <li>review the changes, and if acceptable, click save; repeat 'til done.</li></ol> <meta property="mw:PageProp/toc" /> <div class="mw-heading mw-heading2"><h2 id="settings_file">settings file</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Trappist_the_monk/IANA_subtag_registry_file_update&action=edit&section=1" title="Edit section: settings file"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="cp"><?xml version="1.0" encoding="utf-8"?></span> <span class="nt"><AutoWikiBrowserPreferences</span><span class="w"> </span><span class="na">xmlns:xsi=</span><span class="s">"http://www.w3.org/2001/XMLSchema-instance"</span><span class="w"> </span><span class="na">xmlns:xsd=</span><span class="s">"http://www.w3.org/2001/XMLSchema"</span><span class="w"> </span><span class="na">xml:space=</span><span class="s">"preserve"</span><span class="w"> </span><span class="na">Version=</span><span class="s">"6.3.0.0"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><Project></span>wikipedia<span class="nt"></Project></span> <span class="w"> </span><span class="nt"><LanguageCode></span>en<span class="nt"></LanguageCode></span> <span class="w"> </span><span class="nt"><CustomProject</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><Protocol></span>http://<span class="nt"></Protocol></span> <span class="w"> </span><span class="nt"><LoginDomain</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><List></span> <span class="w"> </span><span class="nt"><ListSource</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><SelectedProvider></span>CategoryListProvider<span class="nt"></SelectedProvider></span> <span class="w"> </span><span class="nt"><ArticleList></span> <span class="w"> </span><span class="nt"><Article</span><span class="w"> </span><span class="na">NameSpaceKey=</span><span class="s">"828"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><PreProcessed></span>false<span class="nt"></PreProcessed></span> <span class="w"> </span><span class="nt"><Name></span>Module:Lang/data/iana<span class="w"> </span>languages<span class="nt"></Name></span> <span class="w"> </span><span class="nt"></Article></span> <span class="w"> </span><span class="nt"><Article</span><span class="w"> </span><span class="na">NameSpaceKey=</span><span class="s">"828"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><PreProcessed></span>false<span class="nt"></PreProcessed></span> <span class="w"> </span><span class="nt"><Name></span>Module:Lang/data/iana<span class="w"> </span>scripts<span class="nt"></Name></span> <span class="w"> </span><span class="nt"></Article></span> <span class="w"> </span><span class="nt"><Article</span><span class="w"> </span><span class="na">NameSpaceKey=</span><span class="s">"828"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><PreProcessed></span>false<span class="nt"></PreProcessed></span> <span class="w"> </span><span class="nt"><Name></span>Module:Lang/data/iana<span class="w"> </span>regions<span class="nt"></Name></span> <span class="w"> </span><span class="nt"></Article></span> <span class="w"> </span><span class="nt"><Article</span><span class="w"> </span><span class="na">NameSpaceKey=</span><span class="s">"828"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><PreProcessed></span>false<span class="nt"></PreProcessed></span> <span class="w"> </span><span class="nt"><Name></span>Module:Lang/data/iana<span class="w"> </span>variants<span class="nt"></Name></span> <span class="w"> </span><span class="nt"></Article></span> <span class="w"> </span><span class="nt"><Article</span><span class="w"> </span><span class="na">NameSpaceKey=</span><span class="s">"828"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><PreProcessed></span>false<span class="nt"></PreProcessed></span> <span class="w"> </span><span class="nt"><Name></span>Module:Lang/data/iana<span class="w"> </span>suppressed<span class="w"> </span>scripts<span class="nt"></Name></span> <span class="w"> </span><span class="nt"></Article></span> <span class="w"> </span><span class="nt"><Article</span><span class="w"> </span><span class="na">NameSpaceKey=</span><span class="s">"828"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><PreProcessed></span>false<span class="nt"></PreProcessed></span> <span class="w"> </span><span class="nt"><Name></span>Module:ISO<span class="w"> </span>639<span class="w"> </span>name/ISO<span class="w"> </span>639-1<span class="nt"></Name></span> <span class="w"> </span><span class="nt"></Article></span> <span class="w"> </span><span class="nt"></ArticleList></span> <span class="w"> </span><span class="nt"></List></span> <span class="w"> </span><span class="nt"><FindAndReplace></span> <span class="w"> </span><span class="nt"><Enabled></span>false<span class="nt"></Enabled></span> <span class="w"> </span><span class="nt"><IgnoreSomeText></span>false<span class="nt"></IgnoreSomeText></span> <span class="w"> </span><span class="nt"><IgnoreMoreText></span>false<span class="nt"></IgnoreMoreText></span> <span class="w"> </span><span class="nt"><AppendSummary></span>false<span class="nt"></AppendSummary></span> <span class="w"> </span><span class="nt"><Replacements</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><AdvancedReps</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><SubstTemplates</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><IncludeComments></span>false<span class="nt"></IncludeComments></span> <span class="w"> </span><span class="nt"><ExpandRecursively></span>true<span class="nt"></ExpandRecursively></span> <span class="w"> </span><span class="nt"><IgnoreUnformatted></span>false<span class="nt"></IgnoreUnformatted></span> <span class="w"> </span><span class="nt"></FindAndReplace></span> <span class="w"> </span><span class="nt"><Editprefs></span> <span class="w"> </span><span class="nt"><GeneralFixes></span>false<span class="nt"></GeneralFixes></span> <span class="w"> </span><span class="nt"><Tagger></span>false<span class="nt"></Tagger></span> <span class="w"> </span><span class="nt"><Unicodify></span>false<span class="nt"></Unicodify></span> <span class="w"> </span><span class="nt"><Recategorisation></span>0<span class="nt"></Recategorisation></span> <span class="w"> </span><span class="nt"><NewCategory</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><NewCategory2</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><ReImage></span>0<span class="nt"></ReImage></span> <span class="w"> </span><span class="nt"><ImageFind</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><Replace</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><SkipIfNoCatChange></span>false<span class="nt"></SkipIfNoCatChange></span> <span class="w"> </span><span class="nt"><RemoveSortKey></span>false<span class="nt"></RemoveSortKey></span> <span class="w"> </span><span class="nt"><SkipIfNoImgChange></span>false<span class="nt"></SkipIfNoImgChange></span> <span class="w"> </span><span class="nt"><AppendText></span>false<span class="nt"></AppendText></span> <span class="w"> </span><span class="nt"><AppendTextMetaDataSort></span>false<span class="nt"></AppendTextMetaDataSort></span> <span class="w"> </span><span class="nt"><Append></span>false<span class="nt"></Append></span> <span class="w"> </span><span class="nt"><Text</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><Newlines></span>0<span class="nt"></Newlines></span> <span class="w"> </span><span class="nt"><AutoDelay></span>0<span class="nt"></AutoDelay></span> <span class="w"> </span><span class="nt"><BotMaxEdits></span>0<span class="nt"></BotMaxEdits></span> <span class="w"> </span><span class="nt"><SupressTag></span>false<span class="nt"></SupressTag></span> <span class="w"> </span><span class="nt"><RegexTypoFix></span>false<span class="nt"></RegexTypoFix></span> <span class="w"> </span><span class="nt"></Editprefs></span> <span class="w"> </span><span class="nt"><General></span> <span class="w"> </span><span class="nt"><AutoSaveEdit></span> <span class="w"> </span><span class="nt"><Enabled></span>false<span class="nt"></Enabled></span> <span class="w"> </span><span class="nt"><SavePeriod></span>30<span class="nt"></SavePeriod></span> <span class="w"> </span><span class="nt"><SaveFile</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"></AutoSaveEdit></span> <span class="w"> </span><span class="nt"><SelectedSummary</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><Summaries></span> <span class="w"> </span><span class="nt"><string></span>clean<span class="w"> </span>up<span class="nt"></string></span> <span class="w"> </span><span class="nt"><string></span>re-categorisation<span class="w"> </span>per<span class="w"> </span>[[WP:CFD|CFD]]<span class="nt"></string></span> <span class="w"> </span><span class="nt"><string></span>clean<span class="w"> </span>up<span class="w"> </span>and<span class="w"> </span>re-categorisation<span class="w"> </span>per<span class="w"> </span>[[WP:CFD|CFD]]<span class="nt"></string></span> <span class="w"> </span><span class="nt"><string></span>removing<span class="w"> </span>category<span class="w"> </span>per<span class="w"> </span>[[WP:CFD|CFD]]<span class="nt"></string></span> <span class="w"> </span><span class="nt"><string></span>[[Wikipedia:Template<span class="w"> </span>substitution|subst:'ing]]<span class="nt"></string></span> <span class="w"> </span><span class="nt"><string></span>[[Wikipedia:WikiProject<span class="w"> </span>Stub<span class="w"> </span>sorting|stub<span class="w"> </span>sorting]]<span class="nt"></string></span> <span class="w"> </span><span class="nt"><string></span>[[WP:AWB/T|Typo<span class="w"> </span>fixing]]<span class="nt"></string></span> <span class="w"> </span><span class="nt"><string></span>bad<span class="w"> </span>link<span class="w"> </span>repair<span class="nt"></string></span> <span class="w"> </span><span class="nt"><string></span>Fixing<span class="w"> </span>[[Wikipedia:Disambiguation<span class="w"> </span>pages<span class="w"> </span>with<span class="w"> </span>links|links<span class="w"> </span>to<span class="w"> </span>disambiguation<span class="w"> </span>pages]]<span class="nt"></string></span> <span class="w"> </span><span class="nt"><string></span>Unicodifying<span class="nt"></string></span> <span class="w"> </span><span class="nt"><string></span>use<span class="w"> </span>[[Module:Lang]];<span class="w"> </span>see<span class="w"> </span>[[Template<span class="w"> </span>talk:Lang#converting<span class="w"> </span>to<span class="w"> </span>lua]];<span class="nt"></string></span> <span class="w"> </span><span class="nt"></Summaries></span> <span class="w"> </span><span class="nt"><PasteMore></span> <span class="w"> </span><span class="nt"><string</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><string</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><string</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><string</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><string</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><string</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><string</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><string</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><string</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><string</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"></PasteMore></span> <span class="w"> </span><span class="nt"><FindText</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><FindRegex></span>false<span class="nt"></FindRegex></span> <span class="w"> </span><span class="nt"><FindCaseSensitive></span>false<span class="nt"></FindCaseSensitive></span> <span class="w"> </span><span class="nt"><WordWrap></span>true<span class="nt"></WordWrap></span> <span class="w"> </span><span class="nt"><ToolBarEnabled></span>false<span class="nt"></ToolBarEnabled></span> <span class="w"> </span><span class="nt"><BypassRedirect></span>true<span class="nt"></BypassRedirect></span> <span class="w"> </span><span class="nt"><AutoSaveSettings></span>false<span class="nt"></AutoSaveSettings></span> <span class="w"> </span><span class="nt"><noSectionEditSummary></span>true<span class="nt"></noSectionEditSummary></span> <span class="w"> </span><span class="nt"><restrictDefaultsortAddition></span>true<span class="nt"></restrictDefaultsortAddition></span> <span class="w"> </span><span class="nt"><restrictOrphanTagging></span>true<span class="nt"></restrictOrphanTagging></span> <span class="w"> </span><span class="nt"><noMOSComplianceFixes></span>false<span class="nt"></noMOSComplianceFixes></span> <span class="w"> </span><span class="nt"><syntaxHighlightEditBox></span>false<span class="nt"></syntaxHighlightEditBox></span> <span class="w"> </span><span class="nt"><highlightAllFind></span>false<span class="nt"></highlightAllFind></span> <span class="w"> </span><span class="nt"><PreParseMode></span>false<span class="nt"></PreParseMode></span> <span class="w"> </span><span class="nt"><NoAutoChanges></span>false<span class="nt"></NoAutoChanges></span> <span class="w"> </span><span class="nt"><OnLoadAction></span>0<span class="nt"></OnLoadAction></span> <span class="w"> </span><span class="nt"><DiffInBotMode></span>false<span class="nt"></DiffInBotMode></span> <span class="w"> </span><span class="nt"><Minor></span>true<span class="nt"></Minor></span> <span class="w"> </span><span class="nt"><AddToWatchlist></span>2<span class="nt"></AddToWatchlist></span> <span class="w"> </span><span class="nt"><TimerEnabled></span>false<span class="nt"></TimerEnabled></span> <span class="w"> </span><span class="nt"><SortListAlphabetically></span>false<span class="nt"></SortListAlphabetically></span> <span class="w"> </span><span class="nt"><AddIgnoredToLog></span>false<span class="nt"></AddIgnoredToLog></span> <span class="w"> </span><span class="nt"><EditToolbarEnabled></span>false<span class="nt"></EditToolbarEnabled></span> <span class="w"> </span><span class="nt"><filterNonMainSpace></span>false<span class="nt"></filterNonMainSpace></span> <span class="w"> </span><span class="nt"><AutoFilterDuplicates></span>false<span class="nt"></AutoFilterDuplicates></span> <span class="w"> </span><span class="nt"><FocusAtEndOfEditBox></span>false<span class="nt"></FocusAtEndOfEditBox></span> <span class="w"> </span><span class="nt"><scrollToUnbalancedBrackets></span>false<span class="nt"></scrollToUnbalancedBrackets></span> <span class="w"> </span><span class="nt"><TextBoxSize></span>10<span class="nt"></TextBoxSize></span> <span class="w"> </span><span class="nt"><TextBoxFont></span>Courier<span class="w"> </span>New<span class="nt"></TextBoxFont></span> <span class="w"> </span><span class="nt"><LowThreadPriority></span>false<span class="nt"></LowThreadPriority></span> <span class="w"> </span><span class="nt"><Beep></span>false<span class="nt"></Beep></span> <span class="w"> </span><span class="nt"><Flash></span>false<span class="nt"></Flash></span> <span class="w"> </span><span class="nt"><Minimize></span>false<span class="nt"></Minimize></span> <span class="w"> </span><span class="nt"><LockSummary></span>false<span class="nt"></LockSummary></span> <span class="w"> </span><span class="nt"><SaveArticleList></span>true<span class="nt"></SaveArticleList></span> <span class="w"> </span><span class="nt"><SuppressUsingAWB></span>false<span class="nt"></SuppressUsingAWB></span> <span class="w"> </span><span class="nt"><AddUsingAWBToActionSummaries></span>false<span class="nt"></AddUsingAWBToActionSummaries></span> <span class="w"> </span><span class="nt"><IgnoreNoBots></span>false<span class="nt"></IgnoreNoBots></span> <span class="w"> </span><span class="nt"><ClearPageListOnProjectChange></span>false<span class="nt"></ClearPageListOnProjectChange></span> <span class="w"> </span><span class="nt"><SortInterWikiOrder></span>true<span class="nt"></SortInterWikiOrder></span> <span class="w"> </span><span class="nt"><ReplaceReferenceTags></span>true<span class="nt"></ReplaceReferenceTags></span> <span class="w"> </span><span class="nt"><LoggingEnabled></span>true<span class="nt"></LoggingEnabled></span> <span class="w"> </span><span class="nt"><AlertPreferences</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"></General></span> <span class="w"> </span><span class="nt"><SkipOptions></span> <span class="w"> </span><span class="nt"><SkipNonexistent></span>true<span class="nt"></SkipNonexistent></span> <span class="w"> </span><span class="nt"><Skipexistent></span>false<span class="nt"></Skipexistent></span> <span class="w"> </span><span class="nt"><SkipDontCare></span>false<span class="nt"></SkipDontCare></span> <span class="w"> </span><span class="nt"><SkipWhenNoChanges></span>false<span class="nt"></SkipWhenNoChanges></span> <span class="w"> </span><span class="nt"><SkipSpamFilterBlocked></span>false<span class="nt"></SkipSpamFilterBlocked></span> <span class="w"> </span><span class="nt"><SkipInuse></span>false<span class="nt"></SkipInuse></span> <span class="w"> </span><span class="nt"><SkipWhenOnlyWhitespaceChanged></span>false<span class="nt"></SkipWhenOnlyWhitespaceChanged></span> <span class="w"> </span><span class="nt"><SkipOnlyGeneralFixChanges></span>true<span class="nt"></SkipOnlyGeneralFixChanges></span> <span class="w"> </span><span class="nt"><SkipOnlyMinorGeneralFixChanges></span>false<span class="nt"></SkipOnlyMinorGeneralFixChanges></span> <span class="w"> </span><span class="nt"><SkipOnlyCosmetic></span>false<span class="nt"></SkipOnlyCosmetic></span> <span class="w"> </span><span class="nt"><SkipOnlyCasingChanged></span>false<span class="nt"></SkipOnlyCasingChanged></span> <span class="w"> </span><span class="nt"><SkipIfRedirect></span>false<span class="nt"></SkipIfRedirect></span> <span class="w"> </span><span class="nt"><SkipIfNoAlerts></span>false<span class="nt"></SkipIfNoAlerts></span> <span class="w"> </span><span class="nt"><SkipDoes></span>false<span class="nt"></SkipDoes></span> <span class="w"> </span><span class="nt"><SkipDoesText</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><SkipDoesRegex></span>false<span class="nt"></SkipDoesRegex></span> <span class="w"> </span><span class="nt"><SkipDoesCaseSensitive></span>false<span class="nt"></SkipDoesCaseSensitive></span> <span class="w"> </span><span class="nt"><SkipDoesAfterProcessing></span>false<span class="nt"></SkipDoesAfterProcessing></span> <span class="w"> </span><span class="nt"><SkipDoesNot></span>false<span class="nt"></SkipDoesNot></span> <span class="w"> </span><span class="nt"><SkipDoesNotText</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><SkipDoesNotRegex></span>false<span class="nt"></SkipDoesNotRegex></span> <span class="w"> </span><span class="nt"><SkipDoesNotCaseSensitive></span>false<span class="nt"></SkipDoesNotCaseSensitive></span> <span class="w"> </span><span class="nt"><SkipDoesNotAfterProcessing></span>false<span class="nt"></SkipDoesNotAfterProcessing></span> <span class="w"> </span><span class="nt"><SkipNoFindAndReplace></span>false<span class="nt"></SkipNoFindAndReplace></span> <span class="w"> </span><span class="nt"><SkipMinorFindAndReplace></span>false<span class="nt"></SkipMinorFindAndReplace></span> <span class="w"> </span><span class="nt"><SkipNoRegexTypoFix></span>false<span class="nt"></SkipNoRegexTypoFix></span> <span class="w"> </span><span class="nt"><SkipNoDisambiguation></span>false<span class="nt"></SkipNoDisambiguation></span> <span class="w"> </span><span class="nt"><SkipNoLinksOnPage></span>false<span class="nt"></SkipNoLinksOnPage></span> <span class="w"> </span><span class="nt"><GeneralSkipList</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"></SkipOptions></span> <span class="w"> </span><span class="nt"><Module></span> <span class="w"> </span><span class="nt"><Enabled></span>true<span class="nt"></Enabled></span> <span class="w"> </span><span class="nt"><Language></span>C#<span class="w"> </span>3.5<span class="nt"></Language></span> <span class="w"> </span><span class="nt"><Code></span>//<span class="w"> </span>this<span class="w"> </span>script<span class="w"> </span>is<span class="w"> </span>intended<span class="w"> </span>to<span class="w"> </span>simplify<span class="w"> </span>updates<span class="w"> </span>from: //<span class="w"> </span>IANA<span class="w"> </span>[https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry<span class="w"> </span>language-subtag-registry<span class="w"> </span>file] //<span class="w"> </span>to: //<span class="w"> </span>[[Module:Lang/data/iana<span class="w"> </span>languages]] //<span class="w"> </span>[[Module:Lang/data/iana<span class="w"> </span>scripts]] //<span class="w"> </span>[[Module:Lang/data/iana<span class="w"> </span>regions]] //<span class="w"> </span>[[Module:Lang/data/iana<span class="w"> </span>variants]] //<span class="w"> </span>[[Module:Lang/data/iana<span class="w"> </span>suppressed<span class="w"> </span>scripts]] //<span class="w"> </span>[[Module:ISO<span class="w"> </span>639<span class="w"> </span>name/ISO<span class="w"> </span>639-1]] // //<span class="w"> </span>updated<span class="w"> </span>2024–07-12<span class="w"> </span>to<span class="w"> </span>account<span class="w"> </span>for<span class="w"> </span>shift<span class="w"> </span>of<span class="w"> </span>data<span class="w"> </span>files<span class="w"> </span>from<span class="w"> </span>Module:Language/data/~<span class="w"> </span>to<span class="w"> </span>Module:Lang/data/~ //---------------------------<span class="ni">&lt;</span><span class="w"> </span>P<span class="w"> </span>R<span class="w"> </span>O<span class="w"> </span>C<span class="w"> </span>E<span class="w"> </span>S<span class="w"> </span>S<span class="w"> </span>A<span class="w"> </span>R<span class="w"> </span>T<span class="w"> </span>I<span class="w"> </span>C<span class="w"> </span>L<span class="w"> </span>E<span class="w"> </span><span class="ni">&gt;</span>-------------------------------------------------- // // // public<span class="w"> </span>string<span class="w"> </span>ProcessArticle(string<span class="w"> </span>ArticleText,<span class="w"> </span>string<span class="w"> </span>ArticleTitle,<span class="w"> </span>int<span class="w"> </span>wikiNamespace,<span class="w"> </span>out<span class="w"> </span>string<span class="w"> </span>Summary,<span class="w"> </span>out<span class="w"> </span>bool<span class="w"> </span>Skip) <span class="w"> </span>{ <span class="w"> </span>string<span class="w"> </span>replacement<span class="w"> </span>=<span class="w"> </span>null; <span class="w"> </span>Skip<span class="w"> </span>=<span class="w"> </span>false; <span class="w"> </span> <span class="w"> </span>if<span class="w"> </span>(null<span class="w"> </span>!=<span class="w"> </span>ERROR_summary) <span class="w"> </span>{ <span class="w"> </span>Summary<span class="w"> </span>=<span class="w"> </span>"ERROR:<span class="w"> </span>"<span class="w"> </span>+<span class="w"> </span>ERROR_summary; <span class="w"> </span>Skip<span class="w"> </span>=<span class="w"> </span>true; <span class="w"> </span>return<span class="w"> </span>ArticleText; <span class="w"> </span>} <span class="w"> </span>else<span class="w"> </span>if<span class="w"> </span>(null<span class="w"> </span>==<span class="w"> </span>DEBUG_summary) <span class="w"> </span>Summary<span class="w"> </span>=<span class="w"> </span>"update<span class="w"> </span>to<span class="w"> </span>"<span class="w"> </span>+<span class="w"> </span>file_date.Split<span class="w"> </span>(':')[1].Trim()<span class="w"> </span>+<span class="w"> </span>"<span class="w"> </span>data;"; <span class="w"> </span>else <span class="w"> </span>Summary<span class="w"> </span>=<span class="w"> </span>"DEBUG:<span class="w"> </span>"<span class="w"> </span>+<span class="w"> </span>DEBUG_summary; <span class="w"> </span> <span class="w"> </span>switch<span class="w"> </span>(ArticleTitle) <span class="w"> </span>{ <span class="w"> </span>case<span class="w"> </span>"Module:ISO<span class="w"> </span>639<span class="w"> </span>name/ISO<span class="w"> </span>639-1": <span class="w"> </span>replacement<span class="w"> </span>=<span class="w"> </span>String.Join(",\n\t",<span class="w"> </span>ISO_639_1.ToArray());<span class="w"> </span>//<span class="w"> </span>concatenate<span class="w"> </span>the<span class="w"> </span>members<span class="w"> </span>of<span class="w"> </span>the<span class="w"> </span>list<span class="w"> </span>into<span class="w"> </span>a<span class="w"> </span>big<span class="w"> </span>damn<span class="w"> </span>string <span class="w"> </span>break; <span class="w"> </span> //<span class="w"> </span>case<span class="w"> </span>"Module:Lang/data/iana<span class="w"> </span>languages": //<span class="w"> </span>replacement<span class="w"> </span>=<span class="w"> </span>String.Join(",\n\t",<span class="w"> </span>iana_languages.ToArray());<span class="w"> </span>//<span class="w"> </span>concatenate<span class="w"> </span>the<span class="w"> </span>members<span class="w"> </span>of<span class="w"> </span>the<span class="w"> </span>list<span class="w"> </span>into<span class="w"> </span>a<span class="w"> </span>big<span class="w"> </span>damn<span class="w"> </span>string //<span class="w"> </span>break; <span class="w"> </span> <span class="w"> </span>case<span class="w"> </span>"Module:Lang/data/iana<span class="w"> </span>languages": <span class="w"> </span>string<span class="w"> </span>active<span class="w"> </span>=<span class="w"> </span>String.Join(",\n\t",<span class="w"> </span>iana_languages.ToArray());<span class="w"> </span>//<span class="w"> </span>concatenate<span class="w"> </span>the<span class="w"> </span>members<span class="w"> </span>of<span class="w"> </span>the<span class="w"> </span>list<span class="w"> </span>into<span class="w"> </span>a<span class="w"> </span>big<span class="w"> </span>damn<span class="w"> </span>string <span class="w"> </span>string<span class="w"> </span>deprecated<span class="w"> </span>=<span class="w"> </span>String.Join(",\n\t",<span class="w"> </span>iana_languages_dep.ToArray());<span class="w"> </span>//<span class="w"> </span>concatenate<span class="w"> </span>the<span class="w"> </span>members<span class="w"> </span>of<span class="w"> </span>the<span class="w"> </span>list<span class="w"> </span>into<span class="w"> </span>a<span class="w"> </span>big<span class="w"> </span>damn<span class="w"> </span>string <span class="w"> </span>return<span class="w"> </span>"--<span class="w"> </span>"<span class="w"> </span>+<span class="w"> </span>file_date<span class="w"> </span>+<span class="w"> </span>"\nlocal<span class="w"> </span>active<span class="w"> </span>=<span class="w"> </span>{\n\t"<span class="w"> </span>+<span class="w"> </span>active<span class="w"> </span>+<span class="w"> </span>"\n\t}\n\nlocal<span class="w"> </span>deprecated<span class="w"> </span>=<span class="w"> </span>{\n\t"<span class="w"> </span>+<span class="w"> </span>deprecated<span class="w"> </span>+<span class="w"> </span>"\n\t}\n\nreturn<span class="w"> </span>{\n\tactive<span class="w"> </span>=<span class="w"> </span>active,\n\tdeprecated<span class="w"> </span>=<span class="w"> </span>deprecated,\n\t}"; <span class="w"> </span> <span class="w"> </span>case<span class="w"> </span>"Module:Lang/data/iana<span class="w"> </span>scripts": <span class="w"> </span>replacement<span class="w"> </span>=<span class="w"> </span>String.Join(",\n\t",<span class="w"> </span>iana_scripts.ToArray());<span class="w"> </span>//<span class="w"> </span>concatenate<span class="w"> </span>the<span class="w"> </span>members<span class="w"> </span>of<span class="w"> </span>the<span class="w"> </span>list<span class="w"> </span>into<span class="w"> </span>a<span class="w"> </span>big<span class="w"> </span>damn<span class="w"> </span>string <span class="w"> </span>break; <span class="w"> </span>case<span class="w"> </span>"Module:Lang/data/iana<span class="w"> </span>regions": <span class="w"> </span>replacement<span class="w"> </span>=<span class="w"> </span>String.Join(",\n\t",<span class="w"> </span>iana_regions.ToArray());<span class="w"> </span>//<span class="w"> </span>concatenate<span class="w"> </span>the<span class="w"> </span>members<span class="w"> </span>of<span class="w"> </span>the<span class="w"> </span>list<span class="w"> </span>into<span class="w"> </span>a<span class="w"> </span>big<span class="w"> </span>damn<span class="w"> </span>string <span class="w"> </span>break; <span class="w"> </span> <span class="w"> </span>case<span class="w"> </span>"Module:Lang/data/iana<span class="w"> </span>suppressed<span class="w"> </span>scripts": <span class="w"> </span>List<span class="ni">&lt;</span>string<span class="ni">&gt;</span><span class="w"> </span>temp<span class="w"> </span>=<span class="w"> </span>new<span class="w"> </span>List<span class="ni">&lt;</span>string<span class="ni">&gt;</span>(); <span class="w"> </span>string<span class="w"> </span>script<span class="w"> </span>=<span class="w"> </span>null; <span class="w"> </span>string[]<span class="w"> </span>subtags_array; <span class="w"> </span>foreach<span class="w"> </span>(KeyValuePair<span class="ni">&lt;</span>string,<span class="w"> </span>string<span class="ni">&gt;</span><span class="w"> </span>kvp<span class="w"> </span>in<span class="w"> </span>iana_suppressed_scripts) <span class="w"> </span>{ <span class="w"> </span>script<span class="w"> </span>=<span class="w"> </span>"[\""<span class="w"> </span>+<span class="w"> </span>kvp.Key<span class="w"> </span>+<span class="w"> </span>"\"]<span class="w"> </span>=<span class="w"> </span>"; <span class="w"> </span>subtags_array<span class="w"> </span>=<span class="w"> </span>kvp.Value.Split<span class="w"> </span>(','); <span class="w"> </span>temp.Add<span class="w"> </span>(script<span class="w"> </span>+<span class="w"> </span>"{"<span class="w"> </span>+<span class="w"> </span>prettify_suppressed_subtags<span class="w"> </span>(subtags_array)<span class="w"> </span>+<span class="w"> </span>"}"); <span class="w"> </span>} <span class="w"> </span>replacement<span class="w"> </span>=<span class="w"> </span>String.Join(",\n\t",<span class="w"> </span>temp.ToArray());<span class="w"> </span>//<span class="w"> </span>concatenate<span class="w"> </span>the<span class="w"> </span>members<span class="w"> </span>of<span class="w"> </span>the<span class="w"> </span>list<span class="w"> </span>into<span class="w"> </span>a<span class="w"> </span>big<span class="w"> </span>damn<span class="w"> </span>string <span class="w"> </span>break; <span class="w"> </span>case<span class="w"> </span>"Module:Lang/data/iana<span class="w"> </span>variants": <span class="w"> </span>replacement<span class="w"> </span>=<span class="w"> </span>String.Join(",\n\t",<span class="w"> </span>iana_variants.ToArray());<span class="w"> </span>//<span class="w"> </span>concatenate<span class="w"> </span>the<span class="w"> </span>members<span class="w"> </span>of<span class="w"> </span>the<span class="w"> </span>list<span class="w"> </span>into<span class="w"> </span>a<span class="w"> </span>big<span class="w"> </span>damn<span class="w"> </span>string <span class="w"> </span>break; <span class="w"> </span>default: <span class="w"> </span>Summary<span class="w"> </span>=<span class="w"> </span>"Unexpected<span class="w"> </span>article:<span class="w"> </span>"<span class="w"> </span>+<span class="w"> </span>ArticleTitle; <span class="w"> </span>Skip<span class="w"> </span>=<span class="w"> </span>true; <span class="w"> </span>return<span class="w"> </span>ArticleText; <span class="w"> </span>} <span class="w"> </span>return<span class="w"> </span>"--<span class="w"> </span>"<span class="w"> </span>+<span class="w"> </span>file_date<span class="w"> </span>+<span class="w"> </span>"\nreturn<span class="w"> </span>{\n\t"<span class="w"> </span>+<span class="w"> </span>replacement<span class="w"> </span>+<span class="w"> </span>"\n\t}";<span class="w"> </span>//<span class="w"> </span>add<span class="w"> </span>file<span class="w"> </span>date,<span class="w"> </span>open<span class="w"> </span>and<span class="w"> </span>close<span class="w"> </span>the<span class="w"> </span>Lua<span class="w"> </span>table <span class="w"> </span>} <span class="w"> </span> //---------------------------<span class="ni">&lt;</span><span class="w"> </span>P<span class="w"> </span>R<span class="w"> </span>E<span class="w"> </span>T<span class="w"> </span>T<span class="w"> </span>I<span class="w"> </span>F<span class="w"> </span>Y<span class="w"> </span>_<span class="w"> </span>S<span class="w"> </span>U<span class="w"> </span>P<span class="w"> </span>P<span class="w"> </span>R<span class="w"> </span>E<span class="w"> </span>S<span class="w"> </span>S<span class="w"> </span>E<span class="w"> </span>D<span class="w"> </span>_<span class="w"> </span>S<span class="w"> </span>U<span class="w"> </span>B<span class="w"> </span>T<span class="w"> </span>A<span class="w"> </span>G<span class="w"> </span>S<span class="w"> </span><span class="ni">&gt;</span>------------------------ // //<span class="w"> </span>Because<span class="w"> </span>Latn<span class="w"> </span>has<span class="w"> </span>a<span class="w"> </span>lot<span class="w"> </span>of<span class="w"> </span>suppressed<span class="w"> </span>subtags,<span class="w"> </span>to<span class="w"> </span>keep<span class="w"> </span>the<span class="w"> </span>list<span class="w"> </span>from<span class="w"> </span>running<span class="w"> </span>off<span class="w"> </span>the<span class="w"> </span>right<span class="w"> </span>side<span class="w"> </span>of<span class="w"> </span>the<span class="w"> </span>screen //<span class="w"> </span>we<span class="w"> </span>prettify<span class="w"> </span>it<span class="w"> </span>so<span class="w"> </span>that<span class="w"> </span>it<span class="w"> </span>is<span class="w"> </span>several<span class="w"> </span>rows<span class="w"> </span>of<span class="w"> </span>11<span class="w"> </span>language<span class="w"> </span>subtags. // private<span class="w"> </span>string<span class="w"> </span>prettify_suppressed_subtags<span class="w"> </span>(string[]<span class="w"> </span>subtags_array) <span class="w"> </span>{ <span class="w"> </span>int<span class="w"> </span>LIMIT<span class="w"> </span>=<span class="w"> </span>11;<span class="w"> </span>//<span class="w"> </span>set<span class="w"> </span>the<span class="w"> </span>max<span class="w"> </span>number<span class="w"> </span>of<span class="w"> </span>subtags<span class="w"> </span>in<span class="w"> </span>a<span class="w"> </span>row<span class="w"> </span>of<span class="w"> </span>text <span class="w"> </span> <span class="w"> </span>if<span class="w"> </span>(LIMIT<span class="w"> </span><span class="ni">&gt;</span>=<span class="w"> </span>subtags_array.Length)<span class="w"> </span>//<span class="w"> </span>not<span class="w"> </span>so<span class="w"> </span>many? <span class="w"> </span>return<span class="w"> </span>String.Join<span class="w"> </span>(",<span class="w"> </span>",<span class="w"> </span>subtags_array);<span class="w"> </span>//<span class="w"> </span>make<span class="w"> </span>a<span class="w"> </span>string<span class="w"> </span>and<span class="w"> </span>done <span class="w"> </span>List<span class="ni">&lt;</span>string<span class="ni">&gt;</span><span class="w"> </span>subtag_fragment_list<span class="w"> </span>=<span class="w"> </span>new<span class="w"> </span>List<span class="ni">&lt;</span>string<span class="ni">&gt;</span>();<span class="w"> </span>//<span class="w"> </span>list<span class="w"> </span>of<span class="w"> </span>strings<span class="w"> </span>holding<span class="w"> </span>LIMIT<span class="w"> </span>number<span class="w"> </span>of<span class="w"> </span>subtags <span class="w"> </span>string<span class="w"> </span>subtag_fragment_string<span class="w"> </span>=<span class="w"> </span>null;<span class="w"> </span>//<span class="w"> </span>assemble<span class="w"> </span>list<span class="w"> </span>fragments<span class="w"> </span>here <span class="w"> </span> <span class="w"> </span>for<span class="w"> </span>(int<span class="w"> </span>i=0;<span class="w"> </span>subtags_array.Length<span class="w"> </span><span class="ni">&gt;</span><span class="w"> </span>i;<span class="w"> </span>i+=LIMIT)<span class="w"> </span>//<span class="w"> </span>index<span class="w"> </span>fragments<span class="w"> </span>of<span class="w"> </span>LIMIT<span class="w"> </span>subtags <span class="w"> </span>{ <span class="w"> </span>for<span class="w"> </span>(int<span class="w"> </span>count=0,<span class="w"> </span>src_idx=i;<span class="w"> </span>(LIMIT<span class="w"> </span><span class="ni">&gt;</span><span class="w"> </span>count)<span class="w"> </span><span class="ni">&amp;&amp;</span><span class="w"> </span>(subtags_array.Length<span class="w"> </span><span class="ni">&gt;</span><span class="w"> </span>src_idx);<span class="w"> </span>count++,<span class="w"> </span>src_idx++)<span class="w"> </span>//<span class="w"> </span>loop<span class="w"> </span>through<span class="w"> </span>the<span class="w"> </span>source<span class="w"> </span>array<span class="w"> </span>and<span class="w"> </span>get<span class="w"> </span>a<span class="w"> </span>LIMIT<span class="w"> </span>number<span class="w"> </span>of<span class="w"> </span>subtags <span class="w"> </span>{ <span class="w"> </span>if<span class="w"> </span>(0<span class="w"> </span>==<span class="w"> </span>count) <span class="w"> </span>subtag_fragment_string<span class="w"> </span>=<span class="w"> </span>subtags_array[src_idx];<span class="w"> </span>//<span class="w"> </span>start<span class="w"> </span>or<span class="w"> </span>restart<span class="w"> </span>the<span class="w"> </span>string<span class="w"> </span>with<span class="w"> </span>first<span class="w"> </span>subtag<span class="w"> </span>of<span class="w"> </span>this<span class="w"> </span>fragment <span class="w"> </span>else <span class="w"> </span>subtag_fragment_string<span class="w"> </span>=<span class="w"> </span>subtag_fragment_string<span class="w"> </span>+<span class="w"> </span>",<span class="w"> </span>"<span class="w"> </span>+<span class="w"> </span>subtags_array[src_idx];<span class="w"> </span>//<span class="w"> </span>add<span class="w"> </span>subtag<span class="w"> </span>to<span class="w"> </span>comma<span class="w"> </span>separated<span class="w"> </span>string <span class="w"> </span>} <span class="w"> </span>subtag_fragment_list.Add<span class="w"> </span>(subtag_fragment_string);<span class="w"> </span>//<span class="w"> </span>save<span class="w"> </span>fragment<span class="w"> </span>in<span class="w"> </span>list <span class="w"> </span>} <span class="w"> </span> <span class="w"> </span>return<span class="w"> </span>String.Join<span class="w"> </span>(",\n\t\t\t\t",<span class="w"> </span>subtag_fragment_list.ToArray());<span class="w"> </span>//<span class="w"> </span>concatenate<span class="w"> </span>the<span class="w"> </span>fragments<span class="w"> </span>and<span class="w"> </span>done <span class="w"> </span>} //==========================<span class="ni">&lt;&lt;</span><span class="w"> </span>S<span class="w"> </span>T<span class="w"> </span>A<span class="w"> </span>T<span class="w"> </span>I<span class="w"> </span>C<span class="w"> </span>I<span class="w"> </span>N<span class="w"> </span>I<span class="w"> </span>T<span class="w"> </span>I<span class="w"> </span>A<span class="w"> </span>L<span class="w"> </span>I<span class="w"> </span>Z<span class="w"> </span>A<span class="w"> </span>T<span class="w"> </span>I<span class="w"> </span>O<span class="w"> </span>N<span class="w"> </span><span class="ni">&gt;&gt;</span>=================================== // //<span class="w"> </span>Read<span class="w"> </span>the<span class="w"> </span>plain-text<span class="w"> </span>registry<span class="w"> </span>file<span class="w"> </span>from<span class="w"> </span>a<span class="w"> </span>local<span class="w"> </span>drive,<span class="w"> </span>parse<span class="w"> </span>it<span class="w"> </span>apart<span class="w"> </span>much<span class="w"> </span>as<span class="w"> </span>is<span class="w"> </span>done<span class="w"> </span>by //<span class="w"> </span>[[Module:Lang/data/iana<span class="w"> </span>languages/make]].<span class="w"> </span>But,<span class="w"> </span>instead<span class="w"> </span>of<span class="w"> </span>one<span class="w"> </span>large<span class="w"> </span>file<span class="w"> </span>from<span class="w"> </span>which<span class="w"> </span>sections<span class="w"> </span>are<span class="w"> </span>copied //<span class="w"> </span>and<span class="w"> </span>then<span class="w"> </span>pasted<span class="w"> </span>into<span class="w"> </span>the<span class="w"> </span>individual<span class="w"> </span>modules,<span class="w"> </span>create<span class="w"> </span>separate<span class="w"> </span>'files'<span class="w"> </span>and<span class="w"> </span>then<span class="w"> </span>use<span class="w"> </span>awb<span class="w"> </span>to<span class="w"> </span>simply<span class="w"> </span>assign //<span class="w"> </span>ArticleText<span class="w"> </span>=<span class="w"> </span><span class="ni">&lt;</span>new<span class="w"> </span>text<span class="w"> </span>for<span class="w"> </span>ArticleTitle<span class="ni">&gt;</span> //<span class="w"> </span>and<span class="w"> </span>then<span class="w"> </span>return.<span class="w"> </span>The<span class="w"> </span>script's<span class="w"> </span>xml<span class="w"> </span>file<span class="w"> </span>holds<span class="w"> </span>the<span class="w"> </span>list<span class="w"> </span>of<span class="w"> </span>modules<span class="w"> </span>to<span class="w"> </span>be<span class="w"> </span>updated. //<span class="w"> </span>original<span class="w"> </span>snippets<span class="w"> </span>of<span class="w"> </span>this<span class="w"> </span>taken<span class="w"> </span>from<span class="w"> </span>[[Wikipedia:AutoWikiBrowser/Custom_Modules#Passing_text_to_external_program_for_processing]] // //---------------------------<span class="ni">&lt;</span><span class="w"> </span>S<span class="w"> </span>T<span class="w"> </span>A<span class="w"> </span>T<span class="w"> </span>I<span class="w"> </span>C<span class="w"> </span>D<span class="w"> </span>A<span class="w"> </span>T<span class="w"> </span>A<span class="w"> </span><span class="ni">&gt;</span>-------------------------------------------------------- <span class="w"> </span>static<span class="w"> </span>string<span class="w"> </span>subtag_reg_file_url<span class="w"> </span>=<span class="w"> </span>"https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry"; <span class="w"> </span>static<span class="w"> </span>string<span class="w"> </span>subtag_reg_file_name<span class="w"> </span>=<span class="w"> </span>"Z:\\Wikipedia\\language-subtag-registry_2020-07-17.txt"; <span class="w"> </span>static<span class="w"> </span>string[]<span class="w"> </span>sub_tag_records_array;<span class="w"> </span>//<span class="w"> </span>subtag<span class="w"> </span>registry<span class="w"> </span>is<span class="w"> </span>read<span class="w"> </span>into<span class="w"> </span>a<span class="w"> </span>local<span class="w"> </span>string<span class="w"> </span>and<span class="w"> </span>then<span class="w"> </span>split<span class="w"> </span>into<span class="w"> </span>this<span class="w"> </span>static<span class="w"> </span>array <span class="w"> </span>static<span class="w"> </span>string<span class="w"> </span>file_date; <span class="w"> </span>static<span class="w"> </span>string<span class="w"> </span>DEBUG_summary<span class="w"> </span>=<span class="w"> </span>null; <span class="w"> </span>static<span class="w"> </span>string<span class="w"> </span>ERROR_summary<span class="w"> </span>=<span class="w"> </span>null; <span class="w"> </span>static<span class="w"> </span>List<span class="ni">&lt;</span>string<span class="ni">&gt;</span><span class="w"> </span>iana_languages<span class="w"> </span>=<span class="w"> </span>new<span class="w"> </span>List<span class="ni">&lt;</span>string<span class="ni">&gt;</span>(); <span class="w"> </span>static<span class="w"> </span>List<span class="ni">&lt;</span>string<span class="ni">&gt;</span><span class="w"> </span>iana_languages_dep<span class="w"> </span>=<span class="w"> </span>new<span class="w"> </span>List<span class="ni">&lt;</span>string<span class="ni">&gt;</span>(); <span class="w"> </span>static<span class="w"> </span>List<span class="ni">&lt;</span>string<span class="ni">&gt;</span><span class="w"> </span>iana_scripts<span class="w"> </span>=<span class="w"> </span>new<span class="w"> </span>List<span class="ni">&lt;</span>string<span class="ni">&gt;</span>(); <span class="w"> </span>static<span class="w"> </span>List<span class="ni">&lt;</span>string<span class="ni">&gt;</span><span class="w"> </span>iana_regions<span class="w"> </span>=<span class="w"> </span>new<span class="w"> </span>List<span class="ni">&lt;</span>string<span class="ni">&gt;</span>(); <span class="w"> </span>static<span class="w"> </span>List<span class="ni">&lt;</span>string<span class="ni">&gt;</span><span class="w"> </span>iana_variants<span class="w"> </span>=<span class="w"> </span>new<span class="w"> </span>List<span class="ni">&lt;</span>string<span class="ni">&gt;</span>(); <span class="w"> </span>static<span class="w"> </span>SortedList<span class="ni">&lt;</span>string,<span class="w"> </span>string<span class="ni">&gt;</span><span class="w"> </span>iana_suppressed_scripts<span class="w"> </span>=<span class="w"> </span>new<span class="w"> </span>SortedList<span class="ni">&lt;</span>string,<span class="w"> </span>string<span class="ni">&gt;</span>(); <span class="w"> </span>static<span class="w"> </span>List<span class="ni">&lt;</span>string<span class="ni">&gt;</span><span class="w"> </span>ISO_639_1<span class="w"> </span>=<span class="w"> </span>new<span class="w"> </span>List<span class="ni">&lt;</span>string<span class="ni">&gt;</span>(); //---------------------------<span class="ni">&lt;</span><span class="w"> </span>S<span class="w"> </span>T<span class="w"> </span>A<span class="w"> </span>T<span class="w"> </span>I<span class="w"> </span>C<span class="w"> </span>C<span class="w"> </span>O<span class="w"> </span>N<span class="w"> </span>S<span class="w"> </span>T<span class="w"> </span>R<span class="w"> </span>U<span class="w"> </span>C<span class="w"> </span>T<span class="w"> </span>O<span class="w"> </span>R<span class="w"> </span><span class="ni">&gt;</span>------------------------------------------ // //<span class="w"> </span>static<span class="w"> </span>constructor<span class="w"> </span>for<span class="w"> </span>the<span class="w"> </span>CustomModule<span class="w"> </span>class // static<span class="w"> </span>CustomModule() <span class="w"> </span>{ <span class="w"> </span>string<span class="w"> </span>sub_tag_registry_text<span class="w"> </span>=<span class="w"> </span>@""; <span class="w"> </span>try <span class="w"> </span>{ <span class="w"> </span>//<span class="w"> </span>this<span class="w"> </span>WebRequest<span class="w"> </span>code<span class="w"> </span>courtesy<span class="w"> </span>of<span class="w"> </span>en.wiki<span class="w"> </span>editor<span class="w"> </span>User:DavidBrooks <span class="w"> </span>System.Net.HttpWebRequest<span class="w"> </span>webRequest<span class="w"> </span>=<span class="w"> </span>(System.Net.HttpWebRequest)System.Net.WebRequest.Create(subtag_reg_file_url); <span class="w"> </span>webRequest.UserAgent<span class="w"> </span>=<span class="w"> </span>"IANA<span class="w"> </span>subtag<span class="w"> </span>registry<span class="w"> </span>file<span class="w"> </span>update<span class="w"> </span>(https://en.wikipedia.org/wiki/User:Trappist_the_monk/IANA_subtag_registry_file_update)"; <span class="w"> </span>System.IO.Stream<span class="w"> </span>str<span class="w"> </span>=<span class="w"> </span>webRequest.GetResponse().GetResponseStream(); <span class="w"> </span>sub_tag_registry_text<span class="w"> </span>=<span class="w"> </span>new<span class="w"> </span>System.IO.StreamReader(str).ReadToEnd(); //<span class="w"> </span>if<span class="w"> </span>(System.IO.File.Exists<span class="w"> </span>(subtag_reg_file_name)) //<span class="w"> </span>{ //<span class="w"> </span>using<span class="w"> </span>(System.IO.StreamReader<span class="w"> </span>reader<span class="w"> </span>=<span class="w"> </span>System.IO.File.OpenText<span class="w"> </span>(subtag_reg_file_name)) //<span class="w"> </span>sub_tag_registry_text<span class="w"> </span>=<span class="w"> </span>reader.ReadToEnd(); //<span class="w"> </span>} //<span class="w"> </span>else //<span class="w"> </span>ERROR_summary<span class="w"> </span>=<span class="w"> </span>"file<span class="w"> </span>not<span class="w"> </span>found:<span class="w"> </span>"<span class="w"> </span>+<span class="w"> </span>subtag_reg_file_name; <span class="w"> </span>} <span class="w"> </span>catch <span class="w"> </span>{ <span class="w"> </span>ERROR_summary<span class="w"> </span>=<span class="w"> </span>"Exception<span class="w"> </span>occurred<span class="w"> </span>reading:<span class="w"> </span>"<span class="w"> </span>+<span class="w"> </span>subtag_reg_file_url; //<span class="w"> </span>ERROR_summary<span class="w"> </span>=<span class="w"> </span>"Exception<span class="w"> </span>occurred<span class="w"> </span>reading:<span class="w"> </span>"<span class="w"> </span>+<span class="w"> </span>subtag_reg_file_name; <span class="w"> </span>} <span class="w"> </span> <span class="w"> </span>sub_tag_records_array<span class="w"> </span>=<span class="w"> </span>sub_tag_registry_text.Split<span class="w"> </span>(new<span class="w"> </span>string[]<span class="w"> </span>{"%%"},<span class="w"> </span>StringSplitOptions.None); <span class="w"> </span>sub_tag_registry_text<span class="w"> </span>=<span class="w"> </span>null;<span class="w"> </span>//<span class="w"> </span>unset<span class="w"> </span>this<span class="w"> </span>because<span class="w"> </span>we<span class="w"> </span>no<span class="w"> </span>longer<span class="w"> </span>need<span class="w"> </span>it <span class="w"> </span> <span class="w"> </span> <span class="w"> </span>file_date<span class="w"> </span>=<span class="w"> </span>sub_tag_records_array[0].Trim();<span class="w"> </span>//<span class="w"> </span>get<span class="w"> </span>the<span class="w"> </span>file<span class="w"> </span>date <span class="w"> </span>foreach<span class="w"> </span>(string<span class="w"> </span>record<span class="w"> </span>in<span class="w"> </span>sub_tag_records_array.Skip(1))<span class="w"> </span>//<span class="w"> </span>skip<span class="w"> </span>file<span class="w"> </span>date <span class="w"> </span>{ <span class="w"> </span>string[]<span class="w"> </span>record_elements; <span class="w"> </span>string<span class="w"> </span>trimmed_record<span class="w"> </span>=<span class="w"> </span>record.Trim();<span class="w"> </span>//<span class="w"> </span>trim<span class="w"> </span>any<span class="w"> </span>leading<span class="w"> </span>and<span class="w"> </span>trailing<span class="w"> </span>whitespace <span class="w"> </span>record_elements<span class="w"> </span>=<span class="w"> </span>trimmed_record.Split<span class="w"> </span>('\n');<span class="w"> </span>//<span class="w"> </span>split<span class="w"> </span>on<span class="w"> </span>the<span class="w"> </span>newlines<span class="w"> </span>between<span class="w"> </span>record<span class="w"> </span>elements <span class="w"> </span>switch<span class="w"> </span>(record_elements[0].Trim()) <span class="w"> </span>{ <span class="w"> </span>case<span class="w"> </span>"Type:<span class="w"> </span>language": <span class="w"> </span>lang_parse<span class="w"> </span>(record_elements); <span class="w"> </span>break; <span class="w"> </span> <span class="w"> </span>case<span class="w"> </span>"Type:<span class="w"> </span>script": <span class="w"> </span>script_parse<span class="w"> </span>(record_elements); <span class="w"> </span>break; <span class="w"> </span>case<span class="w"> </span>"Type:<span class="w"> </span>region": <span class="w"> </span>region_parse<span class="w"> </span>(record_elements); <span class="w"> </span>break; <span class="w"> </span>case<span class="w"> </span>"Type:<span class="w"> </span>variant": <span class="w"> </span>variant_parse<span class="w"> </span>(record_elements); <span class="w"> </span>break; <span class="w"> </span>} <span class="w"> </span>} <span class="w"> </span>} //---------------------------<span class="ni">&lt;</span><span class="w"> </span>V<span class="w"> </span>A<span class="w"> </span>R<span class="w"> </span>I<span class="w"> </span>A<span class="w"> </span>N<span class="w"> </span>T<span class="w"> </span>_<span class="w"> </span>P<span class="w"> </span>A<span class="w"> </span>R<span class="w"> </span>S<span class="w"> </span>E<span class="w"> </span><span class="ni">&gt;</span>---------------------------------------------------- // //<span class="w"> </span>Read<span class="w"> </span>a<span class="w"> </span>variant<span class="w"> </span>record<span class="w"> </span>and<span class="w"> </span>add<span class="w"> </span>the<span class="w"> </span>important<span class="w"> </span>bits<span class="w"> </span>to<span class="w"> </span>the<span class="w"> </span>iana_variants<span class="w"> </span>list // static<span class="w"> </span>void<span class="w"> </span>variant_parse<span class="w"> </span>(string[]<span class="w"> </span>record_elements) <span class="w"> </span>{ <span class="w"> </span>string<span class="w"> </span>variant<span class="w"> </span>=<span class="w"> </span>null; <span class="w"> </span>string<span class="w"> </span>description_list<span class="w"> </span>=<span class="w"> </span>null; <span class="w"> </span>string<span class="w"> </span>prefix_list<span class="w"> </span>=<span class="w"> </span>null; <span class="w"> </span>List<span class="ni">&lt;</span>string<span class="ni">&gt;</span><span class="w"> </span>prefixes<span class="w"> </span>=<span class="w"> </span>new<span class="w"> </span>List<span class="ni">&lt;</span>string<span class="ni">&gt;</span>();<span class="w"> </span> <span class="w"> </span>foreach<span class="w"> </span>(string<span class="w"> </span>element<span class="w"> </span>in<span class="w"> </span>record_elements) <span class="w"> </span>{ <span class="w"> </span>string[]<span class="w"> </span>element_parts<span class="w"> </span>=<span class="w"> </span>element.Split(':'); <span class="w"> </span>if<span class="w"> </span>(0<span class="w"> </span>==<span class="w"> </span>element_parts[0].IndexOf("<span class="w"> </span>"))<span class="w"> </span>//<span class="w"> </span>when<span class="w"> </span>line<span class="w"> </span>begins<span class="w"> </span>with<span class="w"> </span>two<span class="w"> </span>spaces<span class="w"> </span>it<span class="w"> </span>is<span class="w"> </span>a<span class="w"> </span>continuation<span class="w"> </span>of<span class="w"> </span>the<span class="w"> </span>previous<span class="w"> </span>line <span class="w"> </span>{ <span class="w"> </span>description_list<span class="w"> </span>=<span class="w"> </span>description_list.Substring<span class="w"> </span>(0,<span class="w"> </span>description_list.Length-1);<span class="w"> </span>//<span class="w"> </span>remove<span class="w"> </span>trailing<span class="w"> </span>double<span class="w"> </span>quote<span class="w"> </span>character <span class="w"> </span>description_list<span class="w"> </span>=<span class="w"> </span>description_list<span class="w"> </span>+<span class="w"> </span>"<span class="w"> </span>"<span class="w"> </span>+<span class="w"> </span>element_parts[0].Substring(2)<span class="w"> </span>+<span class="w"> </span>"\"";<span class="w"> </span>//<span class="w"> </span>add<span class="w"> </span>on<span class="w"> </span>the<span class="w"> </span>continuation<span class="w"> </span>and<span class="w"> </span>a<span class="w"> </span>new<span class="w"> </span>double<span class="w"> </span>quote<span class="w"> </span>character <span class="w"> </span>} <span class="w"> </span>if<span class="w"> </span>(String.Equals<span class="w"> </span>("Subtag",<span class="w"> </span>element_parts[0])) <span class="w"> </span>variant<span class="w"> </span>=<span class="w"> </span>element_parts[1].Trim(); <span class="w"> </span>if<span class="w"> </span>(String.Equals<span class="w"> </span>("Description",<span class="w"> </span>element_parts[0]))<span class="w"> </span>//<span class="w"> </span>a<span class="w"> </span>variant<span class="w"> </span>name;<span class="w"> </span>may<span class="w"> </span>continue<span class="w"> </span>on<span class="w"> </span>the<span class="w"> </span>next<span class="w"> </span>line <span class="w"> </span>{ <span class="w"> </span>string<span class="w"> </span>description<span class="w"> </span>=<span class="w"> </span>element_parts[1].Trim(); <span class="w"> </span>description<span class="w"> </span>=<span class="w"> </span>Regex.Replace<span class="w"> </span>(description,<span class="w"> </span>"\"",<span class="w"> </span>"\\\""); <span class="w"> </span>if<span class="w"> </span>(null<span class="w"> </span>==<span class="w"> </span>description_list)<span class="w"> </span>//<span class="w"> </span>done<span class="w"> </span>this<span class="w"> </span>way<span class="w"> </span>because<span class="w"> </span>descriptions<span class="w"> </span>can<span class="w"> </span>continue<span class="w"> </span>on<span class="w"> </span>the<span class="w"> </span>next<span class="w"> </span>line <span class="w"> </span>description_list<span class="w"> </span>=<span class="w"> </span>"\""<span class="w"> </span>+<span class="w"> </span>description<span class="w"> </span>+<span class="w"> </span>"\""; <span class="w"> </span>else <span class="w"> </span>description_list<span class="w"> </span>=<span class="w"> </span>description_list<span class="w"> </span>+<span class="w"> </span>",<span class="w"> </span>\""<span class="w"> </span>+<span class="w"> </span>description<span class="w"> </span>+<span class="w"> </span>"\""; <span class="w"> </span>} <span class="w"> </span>if<span class="w"> </span>(String.Equals<span class="w"> </span>("Prefix",<span class="w"> </span>element_parts[0])) <span class="w"> </span>prefixes.Add<span class="w"> </span>("\""<span class="w"> </span>+<span class="w"> </span>element_parts[1].Trim().ToLower()<span class="w"> </span>+<span class="w"> </span>"\""); <span class="w"> </span>if<span class="w"> </span>(String.Equals<span class="w"> </span>("Deprecated",<span class="w"> </span>element_parts[0])) <span class="w"> </span>return; <span class="w"> </span>if<span class="w"> </span>(String.Equals<span class="w"> </span>("Comments",<span class="w"> </span>element_parts[0])) <span class="w"> </span>break;<span class="w"> </span>//<span class="w"> </span>ignore<span class="w"> </span>comments<span class="w"> </span>until<span class="w"> </span>the<span class="w"> </span>end;<span class="w"> </span>presume<span class="w"> </span>that<span class="w"> </span>these<span class="w"> </span>happen<span class="w"> </span>after<span class="w"> </span>Description<span class="w"> </span>elements <span class="w"> </span>} <span class="w"> </span> <span class="w"> </span>description_list<span class="w"> </span>=<span class="w"> </span>"[\"descriptions\"]<span class="w"> </span>=<span class="w"> </span>{"<span class="w"> </span>+<span class="w"> </span>description_list<span class="w"> </span>+<span class="w"> </span>"},"; <span class="w"> </span>prefix_list<span class="w"> </span>=<span class="w"> </span>"[\"prefixes\"]<span class="w"> </span>=<span class="w"> </span>{"<span class="w"> </span>+<span class="w"> </span>String.Join<span class="w"> </span>(",<span class="w"> </span>",<span class="w"> </span>prefixes.ToArray())<span class="w"> </span>+<span class="w"> </span>"},"; <span class="w"> </span>iana_variants.Add<span class="w"> </span>("[\""<span class="w"> </span>+<span class="w"> </span>variant.Trim()<span class="w"> </span>+<span class="w"> </span>"\"]<span class="w"> </span>=<span class="w"> </span>"<span class="w"> </span>+<span class="w"> </span>"{\n\t\t"<span class="w"> </span>+<span class="w"> </span>description_list<span class="w"> </span>+<span class="w"> </span>"\n\t\t"<span class="w"> </span>+<span class="w"> </span>prefix_list<span class="w"> </span>+<span class="w"> </span>"\n\t\t}"); <span class="w"> </span>} //---------------------------<span class="ni">&lt;</span><span class="w"> </span>R<span class="w"> </span>E<span class="w"> </span>G<span class="w"> </span>I<span class="w"> </span>O<span class="w"> </span>N<span class="w"> </span>_<span class="w"> </span>P<span class="w"> </span>A<span class="w"> </span>R<span class="w"> </span>S<span class="w"> </span>E<span class="w"> </span><span class="ni">&gt;</span>------------------------------------------------------ // //<span class="w"> </span>Read<span class="w"> </span>a<span class="w"> </span>region<span class="w"> </span>record<span class="w"> </span>and<span class="w"> </span>add<span class="w"> </span>the<span class="w"> </span>important<span class="w"> </span>bits<span class="w"> </span>to<span class="w"> </span>the<span class="w"> </span>iana_regions<span class="w"> </span>list // static<span class="w"> </span>void<span class="w"> </span>region_parse<span class="w"> </span>(string[]<span class="w"> </span>record_elements) <span class="w"> </span>{ <span class="w"> </span>string<span class="w"> </span>subtag<span class="w"> </span>=<span class="w"> </span>null;<span class="w"> </span>//<span class="w"> </span>not<span class="w"> </span>used<span class="w"> </span>here;<span class="w"> </span>required<span class="w"> </span>by<span class="w"> </span>lang_parse() <span class="w"> </span>bool<span class="w"> </span>deprecated<span class="w"> </span>=<span class="w"> </span>false;<span class="w"> </span>//<span class="w"> </span>not<span class="w"> </span>used<span class="w"> </span>here;<span class="w"> </span>required<span class="w"> </span>by<span class="w"> </span>lang_parse() <span class="w"> </span>string<span class="w"> </span>result<span class="w"> </span>=<span class="w"> </span>lang_script_region_parse<span class="w"> </span>(record_elements,<span class="w"> </span>ref<span class="w"> </span>subtag,<span class="w"> </span>ref<span class="w"> </span>deprecated); <span class="w"> </span>if<span class="w"> </span>(null<span class="w"> </span>!=<span class="w"> </span>result) <span class="w"> </span>iana_regions.Add<span class="w"> </span>(result); <span class="w"> </span>return; <span class="w"> </span>} //---------------------------<span class="ni">&lt;</span><span class="w"> </span>S<span class="w"> </span>C<span class="w"> </span>R<span class="w"> </span>I<span class="w"> </span>P<span class="w"> </span>T<span class="w"> </span>_<span class="w"> </span>P<span class="w"> </span>A<span class="w"> </span>R<span class="w"> </span>S<span class="w"> </span>E<span class="w"> </span><span class="ni">&gt;</span>------------------------------------------------------ // //<span class="w"> </span>Read<span class="w"> </span>a<span class="w"> </span>script<span class="w"> </span>record<span class="w"> </span>and<span class="w"> </span>add<span class="w"> </span>the<span class="w"> </span>important<span class="w"> </span>bits<span class="w"> </span>to<span class="w"> </span>the<span class="w"> </span>iana_scripts<span class="w"> </span>list//<span class="w"> </span> // static<span class="w"> </span>void<span class="w"> </span>script_parse<span class="w"> </span>(string[]<span class="w"> </span>record_elements) <span class="w"> </span>{ <span class="w"> </span>string<span class="w"> </span>subtag<span class="w"> </span>=<span class="w"> </span>null;<span class="w"> </span>//<span class="w"> </span>not<span class="w"> </span>used<span class="w"> </span>here;<span class="w"> </span>required<span class="w"> </span>by<span class="w"> </span>lang_parse() <span class="w"> </span>bool<span class="w"> </span>deprecated<span class="w"> </span>=<span class="w"> </span>false;<span class="w"> </span>//<span class="w"> </span>not<span class="w"> </span>used<span class="w"> </span>here;<span class="w"> </span>required<span class="w"> </span>by<span class="w"> </span>lang_parse() <span class="w"> </span>string<span class="w"> </span>result<span class="w"> </span>=<span class="w"> </span>lang_script_region_parse<span class="w"> </span>(record_elements,<span class="w"> </span>ref<span class="w"> </span>subtag,<span class="w"> </span>ref<span class="w"> </span>deprecated); <span class="w"> </span> <span class="w"> </span>if<span class="w"> </span>(null<span class="w"> </span>!=<span class="w"> </span>result) <span class="w"> </span>iana_scripts.Add<span class="w"> </span>(result); <span class="w"> </span>return; <span class="w"> </span>} //---------------------------<span class="ni">&lt;</span><span class="w"> </span>L<span class="w"> </span>A<span class="w"> </span>N<span class="w"> </span>G<span class="w"> </span>_<span class="w"> </span>P<span class="w"> </span>A<span class="w"> </span>R<span class="w"> </span>S<span class="w"> </span>E<span class="w"> </span><span class="ni">&gt;</span>---------------------------------------------------------- // //<span class="w"> </span>Read<span class="w"> </span>a<span class="w"> </span>language<span class="w"> </span>record<span class="w"> </span>and<span class="w"> </span>add<span class="w"> </span>the<span class="w"> </span>important<span class="w"> </span>bits<span class="w"> </span>to<span class="w"> </span>the<span class="w"> </span>ISO_639_1<span class="w"> </span>list<span class="w"> </span>(2-character<span class="w"> </span>subtags)<span class="w"> </span>and<span class="w"> </span>/<span class="w"> </span>or<span class="w"> </span>the //<span class="w"> </span>iana_languages<span class="w"> </span>list<span class="w"> </span>(both<span class="w"> </span>2-<span class="w"> </span>and<span class="w"> </span>3-character<span class="w"> </span>subtags) // static<span class="w"> </span>void<span class="w"> </span>lang_parse<span class="w"> </span>(string[]<span class="w"> </span>record_elements) <span class="w"> </span>{ <span class="w"> </span>string<span class="w"> </span>subtag<span class="w"> </span>=<span class="w"> </span>null; <span class="w"> </span>bool<span class="w"> </span>deprecated<span class="w"> </span>=<span class="w"> </span>false; <span class="w"> </span>string<span class="w"> </span>result<span class="w"> </span>=<span class="w"> </span>lang_script_region_parse<span class="w"> </span>(record_elements,<span class="w"> </span>ref<span class="w"> </span>subtag,<span class="w"> </span>ref<span class="w"> </span>deprecated); <span class="w"> </span> <span class="w"> </span>if<span class="w"> </span>(null<span class="w"> </span>==<span class="w"> </span>result) <span class="w"> </span>return; <span class="w"> </span> <span class="w"> </span>if<span class="w"> </span>(deprecated) <span class="w"> </span>iana_languages_dep.Add<span class="w"> </span>(result);<span class="w"> </span>//<span class="w"> </span>gets<span class="w"> </span>2-<span class="w"> </span>and<span class="w"> </span>3-character<span class="w"> </span>deprecated<span class="w"> </span>subtags <span class="w"> </span>else <span class="w"> </span>{ <span class="w"> </span>if<span class="w"> </span>(2<span class="w"> </span>==<span class="w"> </span>subtag.Length) <span class="w"> </span>ISO_639_1.Add<span class="w"> </span>(result);<span class="w"> </span>//<span class="w"> </span>gets<span class="w"> </span>only<span class="w"> </span>2-character<span class="w"> </span>subtags <span class="w"> </span>iana_languages.Add<span class="w"> </span>(result);<span class="w"> </span>//<span class="w"> </span>gets<span class="w"> </span>2-<span class="w"> </span>and<span class="w"> </span>3-character<span class="w"> </span>subtags <span class="w"> </span>} <span class="w"> </span>return; <span class="w"> </span>} //---------------------------<span class="ni">&lt;</span><span class="w"> </span>L<span class="w"> </span>A<span class="w"> </span>N<span class="w"> </span>G<span class="w"> </span>_<span class="w"> </span>S<span class="w"> </span>C<span class="w"> </span>R<span class="w"> </span>I<span class="w"> </span>P<span class="w"> </span>T<span class="w"> </span>_<span class="w"> </span>R<span class="w"> </span>E<span class="w"> </span>G<span class="w"> </span>I<span class="w"> </span>O<span class="w"> </span>N<span class="w"> </span>_<span class="w"> </span>P<span class="w"> </span>A<span class="w"> </span>R<span class="w"> </span>S<span class="w"> </span>E<span class="w"> </span><span class="ni">&gt;</span>------------------------------ // //<span class="w"> </span>common<span class="w"> </span>function<span class="w"> </span>for<span class="w"> </span>extracting<span class="w"> </span>the<span class="w"> </span>important<span class="w"> </span>bits<span class="w"> </span>from<span class="w"> </span>language,<span class="w"> </span>script,<span class="w"> </span>and<span class="w"> </span>region<span class="w"> </span>records // static<span class="w"> </span>string<span class="w"> </span>lang_script_region_parse<span class="w"> </span>(string[]record_elements,<span class="w"> </span>ref<span class="w"> </span>string<span class="w"> </span>subtag,<span class="w"> </span>ref<span class="w"> </span>bool<span class="w"> </span>deprecated) <span class="w"> </span>{ <span class="w"> </span>string<span class="w"> </span>names<span class="w"> </span>=<span class="w"> </span>""; <span class="w"> </span>foreach<span class="w"> </span>(string<span class="w"> </span>element<span class="w"> </span>in<span class="w"> </span>record_elements) <span class="w"> </span>{ <span class="w"> </span>string[]<span class="w"> </span>element_parts<span class="w"> </span>=<span class="w"> </span>element.Split(':'); <span class="w"> </span>if<span class="w"> </span>(0<span class="w"> </span>==<span class="w"> </span>element_parts[0].IndexOf("<span class="w"> </span>"))<span class="w"> </span>//<span class="w"> </span>line<span class="w"> </span>begins<span class="w"> </span>with<span class="w"> </span>two<span class="w"> </span>spaces<span class="w"> </span>it<span class="w"> </span>is<span class="w"> </span>a<span class="w"> </span>continuation<span class="w"> </span>of<span class="w"> </span>the<span class="w"> </span>previous<span class="w"> </span>line <span class="w"> </span>{ <span class="w"> </span>names<span class="w"> </span>=<span class="w"> </span>names.Substring<span class="w"> </span>(0,<span class="w"> </span>names.Length-1);<span class="w"> </span>//<span class="w"> </span>remove<span class="w"> </span>trailing<span class="w"> </span>double<span class="w"> </span>quote<span class="w"> </span>character <span class="w"> </span>names<span class="w"> </span>=<span class="w"> </span>names<span class="w"> </span>+<span class="w"> </span>"<span class="w"> </span>"<span class="w"> </span>+<span class="w"> </span>element_parts[0].Substring(2)<span class="w"> </span>+<span class="w"> </span>"\"";<span class="w"> </span>//<span class="w"> </span>add<span class="w"> </span>on<span class="w"> </span>the<span class="w"> </span>continuation<span class="w"> </span>and<span class="w"> </span>a<span class="w"> </span>new<span class="w"> </span>double<span class="w"> </span>quote<span class="w"> </span>character <span class="w"> </span>} <span class="w"> </span>if<span class="w"> </span>(String.Equals<span class="w"> </span>("Subtag",<span class="w"> </span>element_parts[0])) <span class="w"> </span>subtag<span class="w"> </span>=<span class="w"> </span>element_parts[1].Trim(); <span class="w"> </span>if<span class="w"> </span>(String.Equals<span class="w"> </span>("Description",<span class="w"> </span>element_parts[0]))<span class="w"> </span>//<span class="w"> </span>a<span class="w"> </span>language<span class="w"> </span>name;<span class="w"> </span>may<span class="w"> </span>continue<span class="w"> </span>on<span class="w"> </span>the<span class="w"> </span>next<span class="w"> </span>line <span class="w"> </span>{ <span class="w"> </span>if<span class="w"> </span>(String.Equals<span class="w"> </span>("Private<span class="w"> </span>use",<span class="w"> </span>element_parts[1].Trim()))<span class="w"> </span>//<span class="w"> </span>private<span class="w"> </span>use<span class="w"> </span>subtags<span class="w"> </span>not<span class="w"> </span>supported <span class="w"> </span>return<span class="w"> </span>null; <span class="w"> </span>if<span class="w"> </span>(0<span class="w"> </span>==<span class="w"> </span>names.Length)<span class="w"> </span>//<span class="w"> </span>done<span class="w"> </span>this<span class="w"> </span>way<span class="w"> </span>because<span class="w"> </span>descriptions<span class="w"> </span>can<span class="w"> </span>continue<span class="w"> </span>on<span class="w"> </span>the<span class="w"> </span>next<span class="w"> </span>line <span class="w"> </span>names<span class="w"> </span>=<span class="w"> </span>"\""<span class="w"> </span>+<span class="w"> </span>element_parts[1].Trim()<span class="w"> </span>+<span class="w"> </span>"\""; <span class="w"> </span>else <span class="w"> </span>names<span class="w"> </span>=<span class="w"> </span>names<span class="w"> </span>+<span class="w"> </span>",<span class="w"> </span>\""<span class="w"> </span>+<span class="w"> </span>element_parts[1].Trim()<span class="w"> </span>+<span class="w"> </span>"\""; <span class="w"> </span>} <span class="w"> </span>if<span class="w"> </span>(String.Equals<span class="w"> </span>("Suppress-Script",<span class="w"> </span>element_parts[0])) <span class="w"> </span>suppress_script_add<span class="w"> </span>(element_parts[1].Trim(),<span class="w"> </span>subtag);<span class="w"> </span>//<span class="w"> </span>add<span class="w"> </span>this<span class="w"> </span>subtag<span class="w"> </span>to<span class="w"> </span>this<span class="w"> </span>script's<span class="w"> </span>list <span class="w"> </span>if<span class="w"> </span>(String.Equals<span class="w"> </span>("Deprecated",<span class="w"> </span>element_parts[0])) <span class="w"> </span>{ <span class="w"> </span>if<span class="w"> </span>(!String.Equals<span class="w"> </span>("Type:<span class="w"> </span>language",<span class="w"> </span>record_elements[0]))<span class="w"> </span>//<span class="w"> </span>ignore<span class="w"> </span>deprecated<span class="w"> </span>script<span class="w"> </span>and<span class="w"> </span>region<span class="w"> </span>tags <span class="w"> </span>return<span class="w"> </span>null; <span class="w"> </span>deprecated<span class="w"> </span>=<span class="w"> </span>true;<span class="w"> </span>//<span class="w"> </span>report<span class="w"> </span>to<span class="w"> </span>calling<span class="w"> </span>function<span class="w"> </span>that<span class="w"> </span>this<span class="w"> </span>subtag<span class="w"> </span>is<span class="w"> </span>deprecated <span class="w"> </span>} <span class="w"> </span>if<span class="w"> </span>(String.Equals<span class="w"> </span>("Comments",<span class="w"> </span>element_parts[0])) <span class="w"> </span>break;<span class="w"> </span>//<span class="w"> </span>ignore<span class="w"> </span>comments<span class="w"> </span>until<span class="w"> </span>the<span class="w"> </span>end;<span class="w"> </span>presume<span class="w"> </span>that<span class="w"> </span>these<span class="w"> </span>happen<span class="w"> </span>after<span class="w"> </span>Description<span class="w"> </span>elements <span class="w"> </span>} <span class="w"> </span> <span class="w"> </span>return<span class="w"> </span>"[\""<span class="w"> </span>+<span class="w"> </span>subtag.Trim()<span class="w"> </span>+<span class="w"> </span>"\"]<span class="w"> </span>=<span class="w"> </span>"<span class="w"> </span>+<span class="w"> </span>"{"<span class="w"> </span>+<span class="w"> </span>names<span class="w"> </span>+<span class="w"> </span>"}"; <span class="w"> </span>} //---------------------------<span class="ni">&lt;</span><span class="w"> </span>S<span class="w"> </span>U<span class="w"> </span>P<span class="w"> </span>P<span class="w"> </span>R<span class="w"> </span>E<span class="w"> </span>S<span class="w"> </span>S<span class="w"> </span>_<span class="w"> </span>S<span class="w"> </span>C<span class="w"> </span>R<span class="w"> </span>I<span class="w"> </span>P<span class="w"> </span>T<span class="w"> </span>_<span class="w"> </span>A<span class="w"> </span>D<span class="w"> </span>D<span class="w"> </span><span class="ni">&gt;</span>---------------------------------------- // //<span class="w"> </span>manages<span class="w"> </span>the<span class="w"> </span>addition<span class="w"> </span>of<span class="w"> </span>a<span class="w"> </span>new<span class="w"> </span>script<span class="w"> </span>and<span class="w"> </span>its<span class="w"> </span>suppressed<span class="w"> </span>subtag<span class="w"> </span>and<span class="w"> </span>manages<span class="w"> </span>the<span class="w"> </span>addition<span class="w"> </span>of<span class="w"> </span>a<span class="w"> </span>new<span class="w"> </span>subtag<span class="w"> </span>to //<span class="w"> </span>a<span class="w"> </span>script's<span class="w"> </span>existing<span class="w"> </span>list<span class="w"> </span>of<span class="w"> </span>subtags // static<span class="w"> </span>void<span class="w"> </span>suppress_script_add<span class="w"> </span>(string<span class="w"> </span>script,<span class="w"> </span>string<span class="w"> </span>subtag) <span class="w"> </span>{ <span class="w"> </span>if<span class="w"> </span>(iana_suppressed_scripts.ContainsKey<span class="w"> </span>(script)) <span class="w"> </span>{ <span class="w"> </span>string<span class="w"> </span>subtags<span class="w"> </span>=<span class="w"> </span>iana_suppressed_scripts[script];<span class="w"> </span>//<span class="w"> </span>get<span class="w"> </span>the<span class="w"> </span>previous<span class="w"> </span>version<span class="w"> </span>of<span class="w"> </span>the<span class="w"> </span>list <span class="w"> </span>subtags<span class="w"> </span>=<span class="w"> </span>subtags<span class="w"> </span>+<span class="w"> </span>",\""<span class="w"> </span>+<span class="w"> </span>subtag<span class="w"> </span>+<span class="w"> </span>"\"";<span class="w"> </span>//<span class="w"> </span>add<span class="w"> </span>this<span class="w"> </span>quoted<span class="w"> </span>subtag<span class="w"> </span>to<span class="w"> </span>the<span class="w"> </span>comma-separated<span class="w"> </span>list <span class="w"> </span>iana_suppressed_scripts[script]<span class="w"> </span>=<span class="w"> </span>subtags;<span class="w"> </span>//<span class="w"> </span>save<span class="w"> </span>it<span class="w"> </span>back<span class="w"> </span>into<span class="w"> </span>the<span class="w"> </span>list <span class="w"> </span>} <span class="w"> </span>else <span class="w"> </span>iana_suppressed_scripts.Add<span class="w"> </span>(script,<span class="w"> </span>"\""<span class="w"> </span>+<span class="w"> </span>subtag<span class="w"> </span>+<span class="w"> </span>"\"");<span class="w"> </span>//<span class="w"> </span>start<span class="w"> </span>a<span class="w"> </span>new<span class="w"> </span>list<span class="w"> </span>for<span class="w"> </span>this<span class="w"> </span>script <span class="w"> </span>return; <span class="w"> </span>} //<span class="w"> </span>Z:\Wikipedia\AWB\IANA_subtag_registry_file_update.cs<span class="nt"></Code></span> <span class="w"> </span><span class="nt"></Module></span> <span class="w"> </span><span class="nt"><ExternalProgram></span> <span class="w"> </span><span class="nt"><Enabled></span>false<span class="nt"></Enabled></span> <span class="w"> </span><span class="nt"><Skip></span>false<span class="nt"></Skip></span> <span class="w"> </span><span class="nt"><Program</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><Parameters</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><PassAsFile></span>true<span class="nt"></PassAsFile></span> <span class="w"> </span><span class="nt"><OutputFile</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"></ExternalProgram></span> <span class="w"> </span><span class="nt"><Disambiguation></span> <span class="w"> </span><span class="nt"><Enabled></span>false<span class="nt"></Enabled></span> <span class="w"> </span><span class="nt"><Link</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><Variants</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><ContextChars></span>20<span class="nt"></ContextChars></span> <span class="w"> </span><span class="nt"></Disambiguation></span> <span class="w"> </span><span class="nt"><Special></span> <span class="w"> </span><span class="nt"><namespaceValues</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><remDupes></span>true<span class="nt"></remDupes></span> <span class="w"> </span><span class="nt"><sortAZ></span>true<span class="nt"></sortAZ></span> <span class="w"> </span><span class="nt"><filterTitlesThatContain></span>false<span class="nt"></filterTitlesThatContain></span> <span class="w"> </span><span class="nt"><filterTitlesThatContainText</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><filterTitlesThatDontContain></span>false<span class="nt"></filterTitlesThatDontContain></span> <span class="w"> </span><span class="nt"><filterTitlesThatDontContainText</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><areRegex></span>false<span class="nt"></areRegex></span> <span class="w"> </span><span class="nt"><opType></span>0<span class="nt"></opType></span> <span class="w"> </span><span class="nt"><remove</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"></Special></span> <span class="w"> </span><span class="nt"><Tool></span> <span class="w"> </span><span class="nt"><ListComparerUseCurrentArticleList></span>0<span class="nt"></ListComparerUseCurrentArticleList></span> <span class="w"> </span><span class="nt"><ListSplitterUseCurrentArticleList></span>0<span class="nt"></ListSplitterUseCurrentArticleList></span> <span class="w"> </span><span class="nt"><DatabaseScannerUseCurrentArticleList></span>0<span class="nt"></DatabaseScannerUseCurrentArticleList></span> <span class="w"> </span><span class="nt"></Tool></span> <span class="w"> </span><span class="nt"><Plugin></span> <span class="w"> </span><span class="nt"><PluginPrefs></span> <span class="w"> </span><span class="nt"><Name></span>CSV<span class="w"> </span>Loader<span class="nt"></Name></span> <span class="w"> </span><span class="nt"><PluginSettings></span> <span class="w"> </span><span class="nt"><anyType</span><span class="w"> </span><span class="na">xsi:type=</span><span class="s">"PrefsKeyPair"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><Name></span>TextMode<span class="nt"></Name></span> <span class="w"> </span><span class="nt"><Setting</span><span class="w"> </span><span class="na">xsi:type=</span><span class="s">"xsd:string"</span><span class="nt">></span>Append<span class="nt"></Setting></span> <span class="w"> </span><span class="nt"></anyType></span> <span class="w"> </span><span class="nt"><anyType</span><span class="w"> </span><span class="na">xsi:type=</span><span class="s">"PrefsKeyPair"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><Name></span>InputText<span class="nt"></Name></span> <span class="w"> </span><span class="nt"><Setting</span><span class="w"> </span><span class="na">xsi:type=</span><span class="s">"xsd:string"</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"></anyType></span> <span class="w"> </span><span class="nt"><anyType</span><span class="w"> </span><span class="na">xsi:type=</span><span class="s">"PrefsKeyPair"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><Name></span>ColumnHeaders<span class="nt"></Name></span> <span class="w"> </span><span class="nt"><Setting</span><span class="w"> </span><span class="na">xsi:type=</span><span class="s">"xsd:string"</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"></anyType></span> <span class="w"> </span><span class="nt"><anyType</span><span class="w"> </span><span class="na">xsi:type=</span><span class="s">"PrefsKeyPair"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><Name></span>Skip<span class="nt"></Name></span> <span class="w"> </span><span class="nt"><Setting</span><span class="w"> </span><span class="na">xsi:type=</span><span class="s">"xsd:boolean"</span><span class="nt">></span>true<span class="nt"></Setting></span> <span class="w"> </span><span class="nt"></anyType></span> <span class="w"> </span><span class="nt"><anyType</span><span class="w"> </span><span class="na">xsi:type=</span><span class="s">"PrefsKeyPair"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><Name></span>Separator<span class="nt"></Name></span> <span class="w"> </span><span class="nt"><Setting</span><span class="w"> </span><span class="na">xsi:type=</span><span class="s">"xsd:string"</span><span class="nt">></span>,<span class="nt"></Setting></span> <span class="w"> </span><span class="nt"></anyType></span> <span class="w"> </span><span class="nt"><anyType</span><span class="w"> </span><span class="na">xsi:type=</span><span class="s">"PrefsKeyPair"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><Name></span>CreateLists<span class="nt"></Name></span> <span class="w"> </span><span class="nt"><Setting</span><span class="w"> </span><span class="na">xsi:type=</span><span class="s">"xsd:boolean"</span><span class="nt">></span>false<span class="nt"></Setting></span> <span class="w"> </span><span class="nt"></anyType></span> <span class="w"> </span><span class="nt"><anyType</span><span class="w"> </span><span class="na">xsi:type=</span><span class="s">"PrefsKeyPair"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><Name></span>ListSeparator<span class="nt"></Name></span> <span class="w"> </span><span class="nt"><Setting</span><span class="w"> </span><span class="na">xsi:type=</span><span class="s">"xsd:string"</span><span class="nt">></span>^<span class="nt"></Setting></span> <span class="w"> </span><span class="nt"></anyType></span> <span class="w"> </span><span class="nt"><anyType</span><span class="w"> </span><span class="na">xsi:type=</span><span class="s">"PrefsKeyPair"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><Name></span>FindReplace<span class="nt"></Name></span> <span class="w"> </span><span class="nt"><Setting</span><span class="w"> </span><span class="na">xsi:type=</span><span class="s">"xsd:boolean"</span><span class="nt">></span>false<span class="nt"></Setting></span> <span class="w"> </span><span class="nt"></anyType></span> <span class="w"> </span><span class="nt"><anyType</span><span class="w"> </span><span class="na">xsi:type=</span><span class="s">"PrefsKeyPair"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><Name></span>EditSummary<span class="nt"></Name></span> <span class="w"> </span><span class="nt"><Setting</span><span class="w"> </span><span class="na">xsi:type=</span><span class="s">"xsd:string"</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"></anyType></span> <span class="w"> </span><span class="nt"></PluginSettings></span> <span class="w"> </span><span class="nt"></PluginPrefs></span> <span class="w"> </span><span class="nt"></Plugin></span> <span class="nt"></AutoWikiBrowserPreferences></span> </pre></div> <div class="mw-heading mw-heading2"><h2 id="c#_module"><span id="c.23_module"></span>c# module</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Trappist_the_monk/IANA_subtag_registry_file_update&action=edit&section=2" title="Edit section: c# module"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-highlight mw-highlight-lang-csharp mw-content-ltr" dir="ltr"><pre><span></span><span class="c1">// this script is intended to simplify updates from:</span> <span class="c1">// IANA [https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry language-subtag-registry file]</span> <span class="c1">// to:</span> <span class="c1">// [[Module:Lang/data/iana languages]]</span> <span class="c1">// [[Module:Lang/data/iana scripts]]</span> <span class="c1">// [[Module:Lang/data/iana regions]]</span> <span class="c1">// [[Module:Lang/data/iana variants]]</span> <span class="c1">// [[Module:Lang/data/iana suppressed scripts]]</span> <span class="c1">// [[Module:ISO 639 name/ISO 639-1]]</span> <span class="c1">//</span> <span class="c1">// updated 2024–07-12 to account for shift of data files from Module:Language/data/~ to Module:Lang/data/~</span> <span class="c1">//---------------------------< P R O C E S S A R T I C L E >--------------------------------------------------</span> <span class="c1">//</span> <span class="c1">//</span> <span class="c1">//</span> <span class="k">public</span><span class="w"> </span><span class="kt">string</span><span class="w"> </span><span class="nf">ProcessArticle</span><span class="p">(</span><span class="kt">string</span><span class="w"> </span><span class="n">ArticleText</span><span class="p">,</span><span class="w"> </span><span class="kt">string</span><span class="w"> </span><span class="n">ArticleTitle</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">wikiNamespace</span><span class="p">,</span><span class="w"> </span><span class="k">out</span><span class="w"> </span><span class="kt">string</span><span class="w"> </span><span class="n">Summary</span><span class="p">,</span><span class="w"> </span><span class="k">out</span><span class="w"> </span><span class="kt">bool</span><span class="w"> </span><span class="n">Skip</span><span class="p">)</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="kt">string</span><span class="w"> </span><span class="n">replacement</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">null</span><span class="p">;</span> <span class="w"> </span><span class="n">Skip</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">false</span><span class="p">;</span> <span class="w"> </span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="k">null</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">ERROR_summary</span><span class="p">)</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="n">Summary</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"ERROR: "</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">ERROR_summary</span><span class="p">;</span> <span class="w"> </span><span class="n">Skip</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">true</span><span class="p">;</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">ArticleText</span><span class="p">;</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="nf">if</span><span class="w"> </span><span class="p">(</span><span class="k">null</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">DEBUG_summary</span><span class="p">)</span> <span class="w"> </span><span class="n">Summary</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"update to "</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">file_date</span><span class="p">.</span><span class="n">Split</span><span class="w"> </span><span class="p">(</span><span class="sc">':'</span><span class="p">)[</span><span class="m">1</span><span class="p">].</span><span class="n">Trim</span><span class="p">()</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">" data;"</span><span class="p">;</span> <span class="w"> </span><span class="k">else</span> <span class="w"> </span><span class="n">Summary</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"DEBUG: "</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">DEBUG_summary</span><span class="p">;</span> <span class="w"> </span> <span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">ArticleTitle</span><span class="p">)</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="s">"Module:ISO 639 name/ISO 639-1"</span><span class="p">:</span> <span class="w"> </span><span class="n">replacement</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">String</span><span class="p">.</span><span class="n">Join</span><span class="p">(</span><span class="s">",\n\t"</span><span class="p">,</span><span class="w"> </span><span class="n">ISO_639_1</span><span class="p">.</span><span class="n">ToArray</span><span class="p">());</span><span class="w"> </span><span class="c1">// concatenate the members of the list into a big damn string</span> <span class="w"> </span><span class="k">break</span><span class="p">;</span> <span class="w"> </span> <span class="c1">// case "Module:Lang/data/iana languages":</span> <span class="c1">// replacement = String.Join(",\n\t", iana_languages.ToArray()); // concatenate the members of the list into a big damn string</span> <span class="c1">// break;</span> <span class="w"> </span> <span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="s">"Module:Lang/data/iana languages"</span><span class="p">:</span> <span class="w"> </span><span class="kt">string</span><span class="w"> </span><span class="n">active</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">String</span><span class="p">.</span><span class="n">Join</span><span class="p">(</span><span class="s">",\n\t"</span><span class="p">,</span><span class="w"> </span><span class="n">iana_languages</span><span class="p">.</span><span class="n">ToArray</span><span class="p">());</span><span class="w"> </span><span class="c1">// concatenate the members of the list into a big damn string</span> <span class="w"> </span><span class="kt">string</span><span class="w"> </span><span class="n">deprecated</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">String</span><span class="p">.</span><span class="n">Join</span><span class="p">(</span><span class="s">",\n\t"</span><span class="p">,</span><span class="w"> </span><span class="n">iana_languages_dep</span><span class="p">.</span><span class="n">ToArray</span><span class="p">());</span><span class="w"> </span><span class="c1">// concatenate the members of the list into a big damn string</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="s">"-- "</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">file_date</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">"\nlocal active = {\n\t"</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">active</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">"\n\t}\n\nlocal deprecated = {\n\t"</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">deprecated</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">"\n\t}\n\nreturn {\n\tactive = active,\n\tdeprecated = deprecated,\n\t}"</span><span class="p">;</span> <span class="w"> </span> <span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="s">"Module:Lang/data/iana scripts"</span><span class="p">:</span> <span class="w"> </span><span class="n">replacement</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">String</span><span class="p">.</span><span class="n">Join</span><span class="p">(</span><span class="s">",\n\t"</span><span class="p">,</span><span class="w"> </span><span class="n">iana_scripts</span><span class="p">.</span><span class="n">ToArray</span><span class="p">());</span><span class="w"> </span><span class="c1">// concatenate the members of the list into a big damn string</span> <span class="w"> </span><span class="k">break</span><span class="p">;</span> <span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="s">"Module:Lang/data/iana regions"</span><span class="p">:</span> <span class="w"> </span><span class="n">replacement</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">String</span><span class="p">.</span><span class="n">Join</span><span class="p">(</span><span class="s">",\n\t"</span><span class="p">,</span><span class="w"> </span><span class="n">iana_regions</span><span class="p">.</span><span class="n">ToArray</span><span class="p">());</span><span class="w"> </span><span class="c1">// concatenate the members of the list into a big damn string</span> <span class="w"> </span><span class="k">break</span><span class="p">;</span> <span class="w"> </span> <span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="s">"Module:Lang/data/iana suppressed scripts"</span><span class="p">:</span> <span class="w"> </span><span class="n">List</span><span class="o"><</span><span class="kt">string</span><span class="o">></span><span class="w"> </span><span class="n">temp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">List</span><span class="o"><</span><span class="kt">string</span><span class="o">></span><span class="p">();</span> <span class="w"> </span><span class="kt">string</span><span class="w"> </span><span class="n">script</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">null</span><span class="p">;</span> <span class="w"> </span><span class="kt">string</span><span class="p">[]</span><span class="w"> </span><span class="n">subtags_array</span><span class="p">;</span> <span class="w"> </span><span class="k">foreach</span><span class="w"> </span><span class="p">(</span><span class="n">KeyValuePair</span><span class="o"><</span><span class="kt">string</span><span class="p">,</span><span class="w"> </span><span class="kt">string</span><span class="o">></span><span class="w"> </span><span class="n">kvp</span><span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="n">iana_suppressed_scripts</span><span class="p">)</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="n">script</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"[\""</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">kvp</span><span class="p">.</span><span class="n">Key</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">"\"] = "</span><span class="p">;</span> <span class="w"> </span><span class="n">subtags_array</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">kvp</span><span class="p">.</span><span class="n">Value</span><span class="p">.</span><span class="n">Split</span><span class="w"> </span><span class="p">(</span><span class="sc">','</span><span class="p">);</span> <span class="w"> </span><span class="n">temp</span><span class="p">.</span><span class="n">Add</span><span class="w"> </span><span class="p">(</span><span class="n">script</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">"{"</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">prettify_suppressed_subtags</span><span class="w"> </span><span class="p">(</span><span class="n">subtags_array</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">"}"</span><span class="p">);</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="n">replacement</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">String</span><span class="p">.</span><span class="n">Join</span><span class="p">(</span><span class="s">",\n\t"</span><span class="p">,</span><span class="w"> </span><span class="n">temp</span><span class="p">.</span><span class="n">ToArray</span><span class="p">());</span><span class="w"> </span><span class="c1">// concatenate the members of the list into a big damn string</span> <span class="w"> </span><span class="k">break</span><span class="p">;</span> <span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="s">"Module:Lang/data/iana variants"</span><span class="p">:</span> <span class="w"> </span><span class="n">replacement</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">String</span><span class="p">.</span><span class="n">Join</span><span class="p">(</span><span class="s">",\n\t"</span><span class="p">,</span><span class="w"> </span><span class="n">iana_variants</span><span class="p">.</span><span class="n">ToArray</span><span class="p">());</span><span class="w"> </span><span class="c1">// concatenate the members of the list into a big damn string</span> <span class="w"> </span><span class="k">break</span><span class="p">;</span> <span class="w"> </span><span class="k">default</span><span class="p">:</span> <span class="w"> </span><span class="n">Summary</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"Unexpected article: "</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">ArticleTitle</span><span class="p">;</span> <span class="w"> </span><span class="n">Skip</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">true</span><span class="p">;</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">ArticleText</span><span class="p">;</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="s">"-- "</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">file_date</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">"\nreturn {\n\t"</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">replacement</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">"\n\t}"</span><span class="p">;</span><span class="w"> </span><span class="c1">// add file date, open and close the Lua table</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span> <span class="c1">//---------------------------< P R E T T I F Y _ S U P P R E S S E D _ S U B T A G S >------------------------</span> <span class="c1">//</span> <span class="c1">// Because Latn has a lot of suppressed subtags, to keep the list from running off the right side of the screen</span> <span class="c1">// we prettify it so that it is several rows of 11 language subtags.</span> <span class="c1">//</span> <span class="k">private</span><span class="w"> </span><span class="kt">string</span><span class="w"> </span><span class="nf">prettify_suppressed_subtags</span><span class="w"> </span><span class="p">(</span><span class="kt">string</span><span class="p">[]</span><span class="w"> </span><span class="n">subtags_array</span><span class="p">)</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">LIMIT</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">11</span><span class="p">;</span><span class="w"> </span><span class="c1">// set the max number of subtags in a row of text</span> <span class="w"> </span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">LIMIT</span><span class="w"> </span><span class="o">>=</span><span class="w"> </span><span class="n">subtags_array</span><span class="p">.</span><span class="n">Length</span><span class="p">)</span><span class="w"> </span><span class="c1">// not so many?</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">String</span><span class="p">.</span><span class="n">Join</span><span class="w"> </span><span class="p">(</span><span class="s">", "</span><span class="p">,</span><span class="w"> </span><span class="n">subtags_array</span><span class="p">);</span><span class="w"> </span><span class="c1">// make a string and done</span> <span class="w"> </span><span class="n">List</span><span class="o"><</span><span class="kt">string</span><span class="o">></span><span class="w"> </span><span class="n">subtag_fragment_list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">List</span><span class="o"><</span><span class="kt">string</span><span class="o">></span><span class="p">();</span><span class="w"> </span><span class="c1">// list of strings holding LIMIT number of subtags</span> <span class="w"> </span><span class="kt">string</span><span class="w"> </span><span class="n">subtag_fragment_string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">null</span><span class="p">;</span><span class="w"> </span><span class="c1">// assemble list fragments here</span> <span class="w"> </span> <span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="o">=</span><span class="m">0</span><span class="p">;</span><span class="w"> </span><span class="n">subtags_array</span><span class="p">.</span><span class="n">Length</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="n">i</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">+=</span><span class="n">LIMIT</span><span class="p">)</span><span class="w"> </span><span class="c1">// index fragments of LIMIT subtags</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">count</span><span class="o">=</span><span class="m">0</span><span class="p">,</span><span class="w"> </span><span class="n">src_idx</span><span class="o">=</span><span class="n">i</span><span class="p">;</span><span class="w"> </span><span class="p">(</span><span class="n">LIMIT</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="n">count</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">subtags_array</span><span class="p">.</span><span class="n">Length</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="n">src_idx</span><span class="p">);</span><span class="w"> </span><span class="n">count</span><span class="o">++</span><span class="p">,</span><span class="w"> </span><span class="n">src_idx</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="c1">// loop through the source array and get a LIMIT number of subtags</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="m">0</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">count</span><span class="p">)</span> <span class="w"> </span><span class="n">subtag_fragment_string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">subtags_array</span><span class="p">[</span><span class="n">src_idx</span><span class="p">];</span><span class="w"> </span><span class="c1">// start or restart the string with first subtag of this fragment</span> <span class="w"> </span><span class="k">else</span> <span class="w"> </span><span class="n">subtag_fragment_string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">subtag_fragment_string</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">", "</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">subtags_array</span><span class="p">[</span><span class="n">src_idx</span><span class="p">];</span><span class="w"> </span><span class="c1">// add subtag to comma separated string</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="n">subtag_fragment_list</span><span class="p">.</span><span class="n">Add</span><span class="w"> </span><span class="p">(</span><span class="n">subtag_fragment_string</span><span class="p">);</span><span class="w"> </span><span class="c1">// save fragment in list</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">String</span><span class="p">.</span><span class="n">Join</span><span class="w"> </span><span class="p">(</span><span class="s">",\n\t\t\t\t"</span><span class="p">,</span><span class="w"> </span><span class="n">subtag_fragment_list</span><span class="p">.</span><span class="n">ToArray</span><span class="p">());</span><span class="w"> </span><span class="c1">// concatenate the fragments and done</span> <span class="w"> </span><span class="p">}</span> <span class="c1">//==========================<< S T A T I C I N I T I A L I Z A T I O N >>===================================</span> <span class="c1">//</span> <span class="c1">// Read the plain-text registry file from a local drive, parse it apart much as is done by</span> <span class="c1">// [[Module:Lang/data/iana languages/make]]. But, instead of one large file from which sections are copied</span> <span class="c1">// and then pasted into the individual modules, create separate 'files' and then use awb to simply assign</span> <span class="c1">// ArticleText = <new text for ArticleTitle></span> <span class="c1">// and then return. The script's xml file holds the list of modules to be updated.</span> <span class="c1">// original snippets of this taken from [[Wikipedia:AutoWikiBrowser/Custom_Modules#Passing_text_to_external_program_for_processing]]</span> <span class="c1">//</span> <span class="c1">//---------------------------< S T A T I C D A T A >--------------------------------------------------------</span> <span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="kt">string</span><span class="w"> </span><span class="n">subtag_reg_file_url</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry"</span><span class="p">;</span> <span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="kt">string</span><span class="w"> </span><span class="n">subtag_reg_file_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"Z:\\Wikipedia\\language-subtag-registry_2020-07-17.txt"</span><span class="p">;</span> <span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="kt">string</span><span class="p">[]</span><span class="w"> </span><span class="n">sub_tag_records_array</span><span class="p">;</span><span class="w"> </span><span class="c1">// subtag registry is read into a local string and then split into this static array</span> <span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="kt">string</span><span class="w"> </span><span class="n">file_date</span><span class="p">;</span> <span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="kt">string</span><span class="w"> </span><span class="n">DEBUG_summary</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">null</span><span class="p">;</span> <span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="kt">string</span><span class="w"> </span><span class="n">ERROR_summary</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">null</span><span class="p">;</span> <span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="n">List</span><span class="o"><</span><span class="kt">string</span><span class="o">></span><span class="w"> </span><span class="n">iana_languages</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">List</span><span class="o"><</span><span class="kt">string</span><span class="o">></span><span class="p">();</span> <span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="n">List</span><span class="o"><</span><span class="kt">string</span><span class="o">></span><span class="w"> </span><span class="n">iana_languages_dep</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">List</span><span class="o"><</span><span class="kt">string</span><span class="o">></span><span class="p">();</span> <span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="n">List</span><span class="o"><</span><span class="kt">string</span><span class="o">></span><span class="w"> </span><span class="n">iana_scripts</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">List</span><span class="o"><</span><span class="kt">string</span><span class="o">></span><span class="p">();</span> <span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="n">List</span><span class="o"><</span><span class="kt">string</span><span class="o">></span><span class="w"> </span><span class="n">iana_regions</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">List</span><span class="o"><</span><span class="kt">string</span><span class="o">></span><span class="p">();</span> <span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="n">List</span><span class="o"><</span><span class="kt">string</span><span class="o">></span><span class="w"> </span><span class="n">iana_variants</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">List</span><span class="o"><</span><span class="kt">string</span><span class="o">></span><span class="p">();</span> <span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="n">SortedList</span><span class="o"><</span><span class="kt">string</span><span class="p">,</span><span class="w"> </span><span class="kt">string</span><span class="o">></span><span class="w"> </span><span class="n">iana_suppressed_scripts</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">SortedList</span><span class="o"><</span><span class="kt">string</span><span class="p">,</span><span class="w"> </span><span class="kt">string</span><span class="o">></span><span class="p">();</span> <span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="n">List</span><span class="o"><</span><span class="kt">string</span><span class="o">></span><span class="w"> </span><span class="n">ISO_639_1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">List</span><span class="o"><</span><span class="kt">string</span><span class="o">></span><span class="p">();</span> <span class="c1">//---------------------------< S T A T I C C O N S T R U C T O R >------------------------------------------</span> <span class="c1">//</span> <span class="c1">// static constructor for the CustomModule class</span> <span class="c1">//</span> <span class="k">static</span><span class="w"> </span><span class="nf">CustomModule</span><span class="p">()</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="kt">string</span><span class="w"> </span><span class="n">sub_tag_registry_text</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">@""</span><span class="p">;</span> <span class="w"> </span><span class="k">try</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="c1">// this WebRequest code courtesy of en.wiki editor User:DavidBrooks</span> <span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="n">Net</span><span class="p">.</span><span class="n">HttpWebRequest</span><span class="w"> </span><span class="n">webRequest</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">System</span><span class="p">.</span><span class="n">Net</span><span class="p">.</span><span class="n">HttpWebRequest</span><span class="p">)</span><span class="n">System</span><span class="p">.</span><span class="n">Net</span><span class="p">.</span><span class="n">WebRequest</span><span class="p">.</span><span class="n">Create</span><span class="p">(</span><span class="n">subtag_reg_file_url</span><span class="p">);</span> <span class="w"> </span><span class="n">webRequest</span><span class="p">.</span><span class="n">UserAgent</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"IANA subtag registry file update (https://en.wikipedia.org/wiki/User:Trappist_the_monk/IANA_subtag_registry_file_update)"</span><span class="p">;</span> <span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="n">IO</span><span class="p">.</span><span class="n">Stream</span><span class="w"> </span><span class="n">str</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">webRequest</span><span class="p">.</span><span class="n">GetResponse</span><span class="p">().</span><span class="n">GetResponseStream</span><span class="p">();</span> <span class="w"> </span><span class="n">sub_tag_registry_text</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="n">IO</span><span class="p">.</span><span class="n">StreamReader</span><span class="p">(</span><span class="n">str</span><span class="p">).</span><span class="n">ReadToEnd</span><span class="p">();</span> <span class="c1">// if (System.IO.File.Exists (subtag_reg_file_name))</span> <span class="c1">// {</span> <span class="c1">// using (System.IO.StreamReader reader = System.IO.File.OpenText (subtag_reg_file_name))</span> <span class="c1">// sub_tag_registry_text = reader.ReadToEnd();</span> <span class="c1">// }</span> <span class="c1">// else</span> <span class="c1">// ERROR_summary = "file not found: " + subtag_reg_file_name;</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="k">catch</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="n">ERROR_summary</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"Exception occurred reading: "</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">subtag_reg_file_url</span><span class="p">;</span> <span class="c1">// ERROR_summary = "Exception occurred reading: " + subtag_reg_file_name;</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span> <span class="w"> </span><span class="n">sub_tag_records_array</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sub_tag_registry_text</span><span class="p">.</span><span class="n">Split</span><span class="w"> </span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="kt">string</span><span class="p">[]</span><span class="w"> </span><span class="p">{</span><span class="s">"%%"</span><span class="p">},</span><span class="w"> </span><span class="n">StringSplitOptions</span><span class="p">.</span><span class="n">None</span><span class="p">);</span> <span class="w"> </span><span class="n">sub_tag_registry_text</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">null</span><span class="p">;</span><span class="w"> </span><span class="c1">// unset this because we no longer need it</span> <span class="w"> </span> <span class="w"> </span> <span class="w"> </span><span class="n">file_date</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sub_tag_records_array</span><span class="p">[</span><span class="m">0</span><span class="p">].</span><span class="n">Trim</span><span class="p">();</span><span class="w"> </span><span class="c1">// get the file date</span> <span class="w"> </span><span class="k">foreach</span><span class="w"> </span><span class="p">(</span><span class="kt">string</span><span class="w"> </span><span class="n">record</span><span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="n">sub_tag_records_array</span><span class="p">.</span><span class="n">Skip</span><span class="p">(</span><span class="m">1</span><span class="p">))</span><span class="w"> </span><span class="c1">// skip file date</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="kt">string</span><span class="p">[]</span><span class="w"> </span><span class="n">record_elements</span><span class="p">;</span> <span class="w"> </span><span class="kt">string</span><span class="w"> </span><span class="n">trimmed_record</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">record</span><span class="p">.</span><span class="n">Trim</span><span class="p">();</span><span class="w"> </span><span class="c1">// trim any leading and trailing whitespace</span> <span class="w"> </span><span class="n">record_elements</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">trimmed_record</span><span class="p">.</span><span class="n">Split</span><span class="w"> </span><span class="p">(</span><span class="sc">'\n'</span><span class="p">);</span><span class="w"> </span><span class="c1">// split on the newlines between record elements</span> <span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">record_elements</span><span class="p">[</span><span class="m">0</span><span class="p">].</span><span class="n">Trim</span><span class="p">())</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="s">"Type: language"</span><span class="p">:</span> <span class="w"> </span><span class="n">lang_parse</span><span class="w"> </span><span class="p">(</span><span class="n">record_elements</span><span class="p">);</span> <span class="w"> </span><span class="k">break</span><span class="p">;</span> <span class="w"> </span> <span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="s">"Type: script"</span><span class="p">:</span> <span class="w"> </span><span class="n">script_parse</span><span class="w"> </span><span class="p">(</span><span class="n">record_elements</span><span class="p">);</span> <span class="w"> </span><span class="k">break</span><span class="p">;</span> <span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="s">"Type: region"</span><span class="p">:</span> <span class="w"> </span><span class="n">region_parse</span><span class="w"> </span><span class="p">(</span><span class="n">record_elements</span><span class="p">);</span> <span class="w"> </span><span class="k">break</span><span class="p">;</span> <span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="s">"Type: variant"</span><span class="p">:</span> <span class="w"> </span><span class="n">variant_parse</span><span class="w"> </span><span class="p">(</span><span class="n">record_elements</span><span class="p">);</span> <span class="w"> </span><span class="k">break</span><span class="p">;</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="p">}</span> <span class="c1">//---------------------------< V A R I A N T _ P A R S E >----------------------------------------------------</span> <span class="c1">//</span> <span class="c1">// Read a variant record and add the important bits to the iana_variants list</span> <span class="c1">//</span> <span class="k">static</span><span class="w"> </span><span class="k">void</span><span class="w"> </span><span class="nf">variant_parse</span><span class="w"> </span><span class="p">(</span><span class="kt">string</span><span class="p">[]</span><span class="w"> </span><span class="n">record_elements</span><span class="p">)</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="kt">string</span><span class="w"> </span><span class="n">variant</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">null</span><span class="p">;</span> <span class="w"> </span><span class="kt">string</span><span class="w"> </span><span class="n">description_list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">null</span><span class="p">;</span> <span class="w"> </span><span class="kt">string</span><span class="w"> </span><span class="n">prefix_list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">null</span><span class="p">;</span> <span class="w"> </span><span class="n">List</span><span class="o"><</span><span class="kt">string</span><span class="o">></span><span class="w"> </span><span class="n">prefixes</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">List</span><span class="o"><</span><span class="kt">string</span><span class="o">></span><span class="p">();</span><span class="w"> </span> <span class="w"> </span><span class="k">foreach</span><span class="w"> </span><span class="p">(</span><span class="kt">string</span><span class="w"> </span><span class="n">element</span><span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="n">record_elements</span><span class="p">)</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="kt">string</span><span class="p">[]</span><span class="w"> </span><span class="n">element_parts</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">element</span><span class="p">.</span><span class="n">Split</span><span class="p">(</span><span class="sc">':'</span><span class="p">);</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="m">0</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">element_parts</span><span class="p">[</span><span class="m">0</span><span class="p">].</span><span class="n">IndexOf</span><span class="p">(</span><span class="s">" "</span><span class="p">))</span><span class="w"> </span><span class="c1">// when line begins with two spaces it is a continuation of the previous line</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="n">description_list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">description_list</span><span class="p">.</span><span class="n">Substring</span><span class="w"> </span><span class="p">(</span><span class="m">0</span><span class="p">,</span><span class="w"> </span><span class="n">description_list</span><span class="p">.</span><span class="n">Length</span><span class="o">-</span><span class="m">1</span><span class="p">);</span><span class="w"> </span><span class="c1">// remove trailing double quote character</span> <span class="w"> </span><span class="n">description_list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">description_list</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">" "</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">element_parts</span><span class="p">[</span><span class="m">0</span><span class="p">].</span><span class="n">Substring</span><span class="p">(</span><span class="m">2</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">"\""</span><span class="p">;</span><span class="w"> </span><span class="c1">// add on the continuation and a new double quote character</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">String</span><span class="p">.</span><span class="n">Equals</span><span class="w"> </span><span class="p">(</span><span class="s">"Subtag"</span><span class="p">,</span><span class="w"> </span><span class="n">element_parts</span><span class="p">[</span><span class="m">0</span><span class="p">]))</span> <span class="w"> </span><span class="n">variant</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">element_parts</span><span class="p">[</span><span class="m">1</span><span class="p">].</span><span class="n">Trim</span><span class="p">();</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">String</span><span class="p">.</span><span class="n">Equals</span><span class="w"> </span><span class="p">(</span><span class="s">"Description"</span><span class="p">,</span><span class="w"> </span><span class="n">element_parts</span><span class="p">[</span><span class="m">0</span><span class="p">]))</span><span class="w"> </span><span class="c1">// a variant name; may continue on the next line</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="kt">string</span><span class="w"> </span><span class="n">description</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">element_parts</span><span class="p">[</span><span class="m">1</span><span class="p">].</span><span class="n">Trim</span><span class="p">();</span> <span class="w"> </span><span class="n">description</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Regex</span><span class="p">.</span><span class="n">Replace</span><span class="w"> </span><span class="p">(</span><span class="n">description</span><span class="p">,</span><span class="w"> </span><span class="s">"\""</span><span class="p">,</span><span class="w"> </span><span class="s">"\\\""</span><span class="p">);</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="k">null</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">description_list</span><span class="p">)</span><span class="w"> </span><span class="c1">// done this way because descriptions can continue on the next line</span> <span class="w"> </span><span class="n">description_list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"\""</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">description</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">"\""</span><span class="p">;</span> <span class="w"> </span><span class="k">else</span> <span class="w"> </span><span class="n">description_list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">description_list</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">", \""</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">description</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">"\""</span><span class="p">;</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">String</span><span class="p">.</span><span class="n">Equals</span><span class="w"> </span><span class="p">(</span><span class="s">"Prefix"</span><span class="p">,</span><span class="w"> </span><span class="n">element_parts</span><span class="p">[</span><span class="m">0</span><span class="p">]))</span> <span class="w"> </span><span class="n">prefixes</span><span class="p">.</span><span class="n">Add</span><span class="w"> </span><span class="p">(</span><span class="s">"\""</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">element_parts</span><span class="p">[</span><span class="m">1</span><span class="p">].</span><span class="n">Trim</span><span class="p">().</span><span class="n">ToLower</span><span class="p">()</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">"\""</span><span class="p">);</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">String</span><span class="p">.</span><span class="n">Equals</span><span class="w"> </span><span class="p">(</span><span class="s">"Deprecated"</span><span class="p">,</span><span class="w"> </span><span class="n">element_parts</span><span class="p">[</span><span class="m">0</span><span class="p">]))</span> <span class="w"> </span><span class="k">return</span><span class="p">;</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">String</span><span class="p">.</span><span class="n">Equals</span><span class="w"> </span><span class="p">(</span><span class="s">"Comments"</span><span class="p">,</span><span class="w"> </span><span class="n">element_parts</span><span class="p">[</span><span class="m">0</span><span class="p">]))</span> <span class="w"> </span><span class="k">break</span><span class="p">;</span><span class="w"> </span><span class="c1">// ignore comments until the end; presume that these happen after Description elements</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span> <span class="w"> </span><span class="n">description_list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"[\"descriptions\"] = {"</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">description_list</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">"},"</span><span class="p">;</span> <span class="w"> </span><span class="n">prefix_list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"[\"prefixes\"] = {"</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">String</span><span class="p">.</span><span class="n">Join</span><span class="w"> </span><span class="p">(</span><span class="s">", "</span><span class="p">,</span><span class="w"> </span><span class="n">prefixes</span><span class="p">.</span><span class="n">ToArray</span><span class="p">())</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">"},"</span><span class="p">;</span> <span class="w"> </span><span class="n">iana_variants</span><span class="p">.</span><span class="n">Add</span><span class="w"> </span><span class="p">(</span><span class="s">"[\""</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">variant</span><span class="p">.</span><span class="n">Trim</span><span class="p">()</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">"\"] = "</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">"{\n\t\t"</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">description_list</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">"\n\t\t"</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">prefix_list</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">"\n\t\t}"</span><span class="p">);</span> <span class="w"> </span><span class="p">}</span> <span class="c1">//---------------------------< R E G I O N _ P A R S E >------------------------------------------------------</span> <span class="c1">//</span> <span class="c1">// Read a region record and add the important bits to the iana_regions list</span> <span class="c1">//</span> <span class="k">static</span><span class="w"> </span><span class="k">void</span><span class="w"> </span><span class="nf">region_parse</span><span class="w"> </span><span class="p">(</span><span class="kt">string</span><span class="p">[]</span><span class="w"> </span><span class="n">record_elements</span><span class="p">)</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="kt">string</span><span class="w"> </span><span class="n">subtag</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">null</span><span class="p">;</span><span class="w"> </span><span class="c1">// not used here; required by lang_parse()</span> <span class="w"> </span><span class="kt">bool</span><span class="w"> </span><span class="n">deprecated</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">false</span><span class="p">;</span><span class="w"> </span><span class="c1">// not used here; required by lang_parse()</span> <span class="w"> </span><span class="kt">string</span><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">lang_script_region_parse</span><span class="w"> </span><span class="p">(</span><span class="n">record_elements</span><span class="p">,</span><span class="w"> </span><span class="k">ref</span><span class="w"> </span><span class="n">subtag</span><span class="p">,</span><span class="w"> </span><span class="k">ref</span><span class="w"> </span><span class="n">deprecated</span><span class="p">);</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="k">null</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">result</span><span class="p">)</span> <span class="w"> </span><span class="n">iana_regions</span><span class="p">.</span><span class="n">Add</span><span class="w"> </span><span class="p">(</span><span class="n">result</span><span class="p">);</span> <span class="w"> </span><span class="k">return</span><span class="p">;</span> <span class="w"> </span><span class="p">}</span> <span class="c1">//---------------------------< S C R I P T _ P A R S E >------------------------------------------------------</span> <span class="c1">//</span> <span class="c1">// Read a script record and add the important bits to the iana_scripts list// </span> <span class="c1">//</span> <span class="k">static</span><span class="w"> </span><span class="k">void</span><span class="w"> </span><span class="nf">script_parse</span><span class="w"> </span><span class="p">(</span><span class="kt">string</span><span class="p">[]</span><span class="w"> </span><span class="n">record_elements</span><span class="p">)</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="kt">string</span><span class="w"> </span><span class="n">subtag</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">null</span><span class="p">;</span><span class="w"> </span><span class="c1">// not used here; required by lang_parse()</span> <span class="w"> </span><span class="kt">bool</span><span class="w"> </span><span class="n">deprecated</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">false</span><span class="p">;</span><span class="w"> </span><span class="c1">// not used here; required by lang_parse()</span> <span class="w"> </span><span class="kt">string</span><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">lang_script_region_parse</span><span class="w"> </span><span class="p">(</span><span class="n">record_elements</span><span class="p">,</span><span class="w"> </span><span class="k">ref</span><span class="w"> </span><span class="n">subtag</span><span class="p">,</span><span class="w"> </span><span class="k">ref</span><span class="w"> </span><span class="n">deprecated</span><span class="p">);</span> <span class="w"> </span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="k">null</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">result</span><span class="p">)</span> <span class="w"> </span><span class="n">iana_scripts</span><span class="p">.</span><span class="n">Add</span><span class="w"> </span><span class="p">(</span><span class="n">result</span><span class="p">);</span> <span class="w"> </span><span class="k">return</span><span class="p">;</span> <span class="w"> </span><span class="p">}</span> <span class="c1">//---------------------------< L A N G _ P A R S E >----------------------------------------------------------</span> <span class="c1">//</span> <span class="c1">// Read a language record and add the important bits to the ISO_639_1 list (2-character subtags) and / or the</span> <span class="c1">// iana_languages list (both 2- and 3-character subtags)</span> <span class="c1">//</span> <span class="k">static</span><span class="w"> </span><span class="k">void</span><span class="w"> </span><span class="nf">lang_parse</span><span class="w"> </span><span class="p">(</span><span class="kt">string</span><span class="p">[]</span><span class="w"> </span><span class="n">record_elements</span><span class="p">)</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="kt">string</span><span class="w"> </span><span class="n">subtag</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">null</span><span class="p">;</span> <span class="w"> </span><span class="kt">bool</span><span class="w"> </span><span class="n">deprecated</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">false</span><span class="p">;</span> <span class="w"> </span><span class="kt">string</span><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">lang_script_region_parse</span><span class="w"> </span><span class="p">(</span><span class="n">record_elements</span><span class="p">,</span><span class="w"> </span><span class="k">ref</span><span class="w"> </span><span class="n">subtag</span><span class="p">,</span><span class="w"> </span><span class="k">ref</span><span class="w"> </span><span class="n">deprecated</span><span class="p">);</span> <span class="w"> </span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="k">null</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">result</span><span class="p">)</span> <span class="w"> </span><span class="k">return</span><span class="p">;</span> <span class="w"> </span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">deprecated</span><span class="p">)</span> <span class="w"> </span><span class="n">iana_languages_dep</span><span class="p">.</span><span class="n">Add</span><span class="w"> </span><span class="p">(</span><span class="n">result</span><span class="p">);</span><span class="w"> </span><span class="c1">// gets 2- and 3-character deprecated subtags</span> <span class="w"> </span><span class="k">else</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="m">2</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">subtag</span><span class="p">.</span><span class="n">Length</span><span class="p">)</span> <span class="w"> </span><span class="n">ISO_639_1</span><span class="p">.</span><span class="n">Add</span><span class="w"> </span><span class="p">(</span><span class="n">result</span><span class="p">);</span><span class="w"> </span><span class="c1">// gets only 2-character subtags</span> <span class="w"> </span><span class="n">iana_languages</span><span class="p">.</span><span class="n">Add</span><span class="w"> </span><span class="p">(</span><span class="n">result</span><span class="p">);</span><span class="w"> </span><span class="c1">// gets 2- and 3-character subtags</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="k">return</span><span class="p">;</span> <span class="w"> </span><span class="p">}</span> <span class="c1">//---------------------------< L A N G _ S C R I P T _ R E G I O N _ P A R S E >------------------------------</span> <span class="c1">//</span> <span class="c1">// common function for extracting the important bits from language, script, and region records</span> <span class="c1">//</span> <span class="k">static</span><span class="w"> </span><span class="kt">string</span><span class="w"> </span><span class="nf">lang_script_region_parse</span><span class="w"> </span><span class="p">(</span><span class="kt">string</span><span class="p">[]</span><span class="n">record_elements</span><span class="p">,</span><span class="w"> </span><span class="k">ref</span><span class="w"> </span><span class="kt">string</span><span class="w"> </span><span class="n">subtag</span><span class="p">,</span><span class="w"> </span><span class="k">ref</span><span class="w"> </span><span class="kt">bool</span><span class="w"> </span><span class="n">deprecated</span><span class="p">)</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="kt">string</span><span class="w"> </span><span class="n">names</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">""</span><span class="p">;</span> <span class="w"> </span><span class="k">foreach</span><span class="w"> </span><span class="p">(</span><span class="kt">string</span><span class="w"> </span><span class="n">element</span><span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="n">record_elements</span><span class="p">)</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="kt">string</span><span class="p">[]</span><span class="w"> </span><span class="n">element_parts</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">element</span><span class="p">.</span><span class="n">Split</span><span class="p">(</span><span class="sc">':'</span><span class="p">);</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="m">0</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">element_parts</span><span class="p">[</span><span class="m">0</span><span class="p">].</span><span class="n">IndexOf</span><span class="p">(</span><span class="s">" "</span><span class="p">))</span><span class="w"> </span><span class="c1">// line begins with two spaces it is a continuation of the previous line</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="n">names</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">names</span><span class="p">.</span><span class="n">Substring</span><span class="w"> </span><span class="p">(</span><span class="m">0</span><span class="p">,</span><span class="w"> </span><span class="n">names</span><span class="p">.</span><span class="n">Length</span><span class="o">-</span><span class="m">1</span><span class="p">);</span><span class="w"> </span><span class="c1">// remove trailing double quote character</span> <span class="w"> </span><span class="n">names</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">names</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">" "</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">element_parts</span><span class="p">[</span><span class="m">0</span><span class="p">].</span><span class="n">Substring</span><span class="p">(</span><span class="m">2</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">"\""</span><span class="p">;</span><span class="w"> </span><span class="c1">// add on the continuation and a new double quote character</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">String</span><span class="p">.</span><span class="n">Equals</span><span class="w"> </span><span class="p">(</span><span class="s">"Subtag"</span><span class="p">,</span><span class="w"> </span><span class="n">element_parts</span><span class="p">[</span><span class="m">0</span><span class="p">]))</span> <span class="w"> </span><span class="n">subtag</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">element_parts</span><span class="p">[</span><span class="m">1</span><span class="p">].</span><span class="n">Trim</span><span class="p">();</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">String</span><span class="p">.</span><span class="n">Equals</span><span class="w"> </span><span class="p">(</span><span class="s">"Description"</span><span class="p">,</span><span class="w"> </span><span class="n">element_parts</span><span class="p">[</span><span class="m">0</span><span class="p">]))</span><span class="w"> </span><span class="c1">// a language name; may continue on the next line</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">String</span><span class="p">.</span><span class="n">Equals</span><span class="w"> </span><span class="p">(</span><span class="s">"Private use"</span><span class="p">,</span><span class="w"> </span><span class="n">element_parts</span><span class="p">[</span><span class="m">1</span><span class="p">].</span><span class="n">Trim</span><span class="p">()))</span><span class="w"> </span><span class="c1">// private use subtags not supported</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="k">null</span><span class="p">;</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="m">0</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">names</span><span class="p">.</span><span class="n">Length</span><span class="p">)</span><span class="w"> </span><span class="c1">// done this way because descriptions can continue on the next line</span> <span class="w"> </span><span class="n">names</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"\""</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">element_parts</span><span class="p">[</span><span class="m">1</span><span class="p">].</span><span class="n">Trim</span><span class="p">()</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">"\""</span><span class="p">;</span> <span class="w"> </span><span class="k">else</span> <span class="w"> </span><span class="n">names</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">names</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">", \""</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">element_parts</span><span class="p">[</span><span class="m">1</span><span class="p">].</span><span class="n">Trim</span><span class="p">()</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">"\""</span><span class="p">;</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">String</span><span class="p">.</span><span class="n">Equals</span><span class="w"> </span><span class="p">(</span><span class="s">"Suppress-Script"</span><span class="p">,</span><span class="w"> </span><span class="n">element_parts</span><span class="p">[</span><span class="m">0</span><span class="p">]))</span> <span class="w"> </span><span class="n">suppress_script_add</span><span class="w"> </span><span class="p">(</span><span class="n">element_parts</span><span class="p">[</span><span class="m">1</span><span class="p">].</span><span class="n">Trim</span><span class="p">(),</span><span class="w"> </span><span class="n">subtag</span><span class="p">);</span><span class="w"> </span><span class="c1">// add this subtag to this script's list</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">String</span><span class="p">.</span><span class="n">Equals</span><span class="w"> </span><span class="p">(</span><span class="s">"Deprecated"</span><span class="p">,</span><span class="w"> </span><span class="n">element_parts</span><span class="p">[</span><span class="m">0</span><span class="p">]))</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">String</span><span class="p">.</span><span class="n">Equals</span><span class="w"> </span><span class="p">(</span><span class="s">"Type: language"</span><span class="p">,</span><span class="w"> </span><span class="n">record_elements</span><span class="p">[</span><span class="m">0</span><span class="p">]))</span><span class="w"> </span><span class="c1">// ignore deprecated script and region tags</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="k">null</span><span class="p">;</span> <span class="w"> </span><span class="n">deprecated</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">true</span><span class="p">;</span><span class="w"> </span><span class="c1">// report to calling function that this subtag is deprecated</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">String</span><span class="p">.</span><span class="n">Equals</span><span class="w"> </span><span class="p">(</span><span class="s">"Comments"</span><span class="p">,</span><span class="w"> </span><span class="n">element_parts</span><span class="p">[</span><span class="m">0</span><span class="p">]))</span> <span class="w"> </span><span class="k">break</span><span class="p">;</span><span class="w"> </span><span class="c1">// ignore comments until the end; presume that these happen after Description elements</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="s">"[\""</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">subtag</span><span class="p">.</span><span class="n">Trim</span><span class="p">()</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">"\"] = "</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">"{"</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">names</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">"}"</span><span class="p">;</span> <span class="w"> </span><span class="p">}</span> <span class="c1">//---------------------------< S U P P R E S S _ S C R I P T _ A D D >----------------------------------------</span> <span class="c1">//</span> <span class="c1">// manages the addition of a new script and its suppressed subtag and manages the addition of a new subtag to</span> <span class="c1">// a script's existing list of subtags</span> <span class="c1">//</span> <span class="k">static</span><span class="w"> </span><span class="k">void</span><span class="w"> </span><span class="nf">suppress_script_add</span><span class="w"> </span><span class="p">(</span><span class="kt">string</span><span class="w"> </span><span class="n">script</span><span class="p">,</span><span class="w"> </span><span class="kt">string</span><span class="w"> </span><span class="n">subtag</span><span class="p">)</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">iana_suppressed_scripts</span><span class="p">.</span><span class="n">ContainsKey</span><span class="w"> </span><span class="p">(</span><span class="n">script</span><span class="p">))</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="kt">string</span><span class="w"> </span><span class="n">subtags</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">iana_suppressed_scripts</span><span class="p">[</span><span class="n">script</span><span class="p">];</span><span class="w"> </span><span class="c1">// get the previous version of the list</span> <span class="w"> </span><span class="n">subtags</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">subtags</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">",\""</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">subtag</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">"\""</span><span class="p">;</span><span class="w"> </span><span class="c1">// add this quoted subtag to the comma-separated list</span> <span class="w"> </span><span class="n">iana_suppressed_scripts</span><span class="p">[</span><span class="n">script</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">subtags</span><span class="p">;</span><span class="w"> </span><span class="c1">// save it back into the list</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="k">else</span> <span class="w"> </span><span class="n">iana_suppressed_scripts</span><span class="p">.</span><span class="n">Add</span><span class="w"> </span><span class="p">(</span><span class="n">script</span><span class="p">,</span><span class="w"> </span><span class="s">"\""</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">subtag</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">"\""</span><span class="p">);</span><span class="w"> </span><span class="c1">// start a new list for this script</span> <span class="w"> </span><span class="k">return</span><span class="p">;</span> <span class="w"> </span><span class="p">}</span> <span class="c1">// Z:\Wikipedia\AWB\IANA_subtag_registry_file_update.cs</span> </pre></div> <!-- NewPP limit report Parsed by mw‐web.eqiad.main‐7c55db6c78‐lv4lw Cached time: 20241026200840 Cache expiry: 2592000 Reduced expiry: false Complications: [show‐toc] CPU time usage: 0.244 seconds Real time usage: 0.460 seconds Preprocessor visited node count: 21/1000000 Post‐expand include size: 0/2097152 bytes Template argument size: 0/2097152 bytes Highest expansion depth: 2/100 Expensive parser function count: 2/500 Unstrip recursion depth: 0/20 Unstrip post‐expand size: 172314/5000000 bytes Number of Wikibase entities loaded: 0/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 0.000 1 -total --> <!-- Saved in parser cache with key enwiki:pcache:idhash:65443591-0!canonical and timestamp 20241026200840 and revision id 1234088430. Rendering was triggered because: page-view --> </div><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Retrieved from "<a dir="ltr" href="https://en.wikipedia.org/w/index.php?title=User:Trappist_the_monk/IANA_subtag_registry_file_update&oldid=1234088430">https://en.wikipedia.org/w/index.php?title=User:Trappist_the_monk/IANA_subtag_registry_file_update&oldid=1234088430</a>"</div></div> <div id="catlinks" class="catlinks catlinks-allhidden" data-mw="interface"></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> <li id="footer-info-lastmod"> This page was last edited on 12 July 2024, at 14:34<span class="anonymous-show"> (UTC)</span>.</li> <li id="footer-info-copyright">Text is available under the <a href="/wiki/Wikipedia:Text_of_the_Creative_Commons_Attribution-ShareAlike_4.0_International_License" title="Wikipedia:Text of the Creative Commons Attribution-ShareAlike 4.0 International License">Creative Commons Attribution-ShareAlike 4.0 License</a>; additional terms may apply. By using this site, you agree to the <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use" class="extiw" title="foundation:Special:MyLanguage/Policy:Terms of Use">Terms of Use</a> and <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy" class="extiw" title="foundation:Special:MyLanguage/Policy:Privacy policy">Privacy Policy</a>. Wikipedia® is a registered trademark of the <a rel="nofollow" class="external text" href="https://wikimediafoundation.org/">Wikimedia Foundation, Inc.</a>, a non-profit organization.</li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Privacy policy</a></li> <li id="footer-places-about"><a href="/wiki/Wikipedia:About">About Wikipedia</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Wikipedia:General_disclaimer">Disclaimers</a></li> <li id="footer-places-contact"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us">Contact Wikipedia</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Code of Conduct</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Developers</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/en.wikipedia.org">Statistics</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Cookie statement</a></li> <li id="footer-places-mobileview"><a href="//en.m.wikipedia.org/w/index.php?title=User:Trappist_the_monk/IANA_subtag_registry_file_update&mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Mobile view</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/w/resources/assets/poweredby_mediawiki.svg" alt="Powered by MediaWiki" width="88" height="31" loading="lazy"></a></li> </ul> </footer> </div> </div> </div> <div class="vector-settings" id="p-dock-bottom"> <ul></ul> </div><script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-f69cdc8f6-hhmqd","wgBackendResponseTime":168,"wgPageParseReport":{"limitreport":{"cputime":"0.244","walltime":"0.460","ppvisitednodes":{"value":21,"limit":1000000},"postexpandincludesize":{"value":0,"limit":2097152},"templateargumentsize":{"value":0,"limit":2097152},"expansiondepth":{"value":2,"limit":100},"expensivefunctioncount":{"value":2,"limit":500},"unstrip-depth":{"value":0,"limit":20},"unstrip-size":{"value":172314,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 0.000 1 -total"]},"cachereport":{"origin":"mw-web.eqiad.main-7c55db6c78-lv4lw","timestamp":"20241026200840","ttl":2592000,"transientcontent":false}}});});</script> </body> </html>