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&amp;modules=ext.pygments%2CwikimediaBadges%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediamessages.styles%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles&amp;only=styles&amp;skin=vector-2022"> <script async="" src="/w/load.php?lang=en&amp;modules=startup&amp;only=scripts&amp;raw=1&amp;skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=en&amp;modules=site.styles&amp;only=styles&amp;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&amp;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&amp;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&#039;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&amp;utm_medium=sidebar&amp;utm_campaign=C13_en.wikipedia.org&amp;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&amp;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&amp;returnto=User%3ATrappist+the+monk%2FIANA+subtag+registry+file+update" title="You&#039;re encouraged to log in; however, it&#039;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&amp;utm_medium=sidebar&amp;utm_campaign=C13_en.wikipedia.org&amp;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&amp;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&amp;returnto=User%3ATrappist+the+monk%2FIANA+subtag+registry+file+update" title="You&#039;re encouraged to log in; however, it&#039;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&amp;action=edit&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;page=User%3ATrappist_the_monk%2FIANA_subtag_registry_file_update&amp;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&amp;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&amp;action=edit&amp;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">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;</span> <span class="nt">&lt;AutoWikiBrowserPreferences</span><span class="w"> </span><span class="na">xmlns:xsi=</span><span class="s">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span><span class="w"> </span><span class="na">xmlns:xsd=</span><span class="s">&quot;http://www.w3.org/2001/XMLSchema&quot;</span><span class="w"> </span><span class="na">xml:space=</span><span class="s">&quot;preserve&quot;</span><span class="w"> </span><span class="na">Version=</span><span class="s">&quot;6.3.0.0&quot;</span><span class="nt">&gt;</span> <span class="w"> </span><span class="nt">&lt;Project&gt;</span>wikipedia<span class="nt">&lt;/Project&gt;</span> <span class="w"> </span><span class="nt">&lt;LanguageCode&gt;</span>en<span class="nt">&lt;/LanguageCode&gt;</span> <span class="w"> </span><span class="nt">&lt;CustomProject</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;Protocol&gt;</span>http://<span class="nt">&lt;/Protocol&gt;</span> <span class="w"> </span><span class="nt">&lt;LoginDomain</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;List&gt;</span> <span class="w"> </span><span class="nt">&lt;ListSource</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;SelectedProvider&gt;</span>CategoryListProvider<span class="nt">&lt;/SelectedProvider&gt;</span> <span class="w"> </span><span class="nt">&lt;ArticleList&gt;</span> <span class="w"> </span><span class="nt">&lt;Article</span><span class="w"> </span><span class="na">NameSpaceKey=</span><span class="s">&quot;828&quot;</span><span class="nt">&gt;</span> <span class="w"> </span><span class="nt">&lt;PreProcessed&gt;</span>false<span class="nt">&lt;/PreProcessed&gt;</span> <span class="w"> </span><span class="nt">&lt;Name&gt;</span>Module:Lang/data/iana<span class="w"> </span>languages<span class="nt">&lt;/Name&gt;</span> <span class="w"> </span><span class="nt">&lt;/Article&gt;</span> <span class="w"> </span><span class="nt">&lt;Article</span><span class="w"> </span><span class="na">NameSpaceKey=</span><span class="s">&quot;828&quot;</span><span class="nt">&gt;</span> <span class="w"> </span><span class="nt">&lt;PreProcessed&gt;</span>false<span class="nt">&lt;/PreProcessed&gt;</span> <span class="w"> </span><span class="nt">&lt;Name&gt;</span>Module:Lang/data/iana<span class="w"> </span>scripts<span class="nt">&lt;/Name&gt;</span> <span class="w"> </span><span class="nt">&lt;/Article&gt;</span> <span class="w"> </span><span class="nt">&lt;Article</span><span class="w"> </span><span class="na">NameSpaceKey=</span><span class="s">&quot;828&quot;</span><span class="nt">&gt;</span> <span class="w"> </span><span class="nt">&lt;PreProcessed&gt;</span>false<span class="nt">&lt;/PreProcessed&gt;</span> <span class="w"> </span><span class="nt">&lt;Name&gt;</span>Module:Lang/data/iana<span class="w"> </span>regions<span class="nt">&lt;/Name&gt;</span> <span class="w"> </span><span class="nt">&lt;/Article&gt;</span> <span class="w"> </span><span class="nt">&lt;Article</span><span class="w"> </span><span class="na">NameSpaceKey=</span><span class="s">&quot;828&quot;</span><span class="nt">&gt;</span> <span class="w"> </span><span class="nt">&lt;PreProcessed&gt;</span>false<span class="nt">&lt;/PreProcessed&gt;</span> <span class="w"> </span><span class="nt">&lt;Name&gt;</span>Module:Lang/data/iana<span class="w"> </span>variants<span class="nt">&lt;/Name&gt;</span> <span class="w"> </span><span class="nt">&lt;/Article&gt;</span> <span class="w"> </span><span class="nt">&lt;Article</span><span class="w"> </span><span class="na">NameSpaceKey=</span><span class="s">&quot;828&quot;</span><span class="nt">&gt;</span> <span class="w"> </span><span class="nt">&lt;PreProcessed&gt;</span>false<span class="nt">&lt;/PreProcessed&gt;</span> <span class="w"> </span><span class="nt">&lt;Name&gt;</span>Module:Lang/data/iana<span class="w"> </span>suppressed<span class="w"> </span>scripts<span class="nt">&lt;/Name&gt;</span> <span class="w"> </span><span class="nt">&lt;/Article&gt;</span> <span class="w"> </span><span class="nt">&lt;Article</span><span class="w"> </span><span class="na">NameSpaceKey=</span><span class="s">&quot;828&quot;</span><span class="nt">&gt;</span> <span class="w"> </span><span class="nt">&lt;PreProcessed&gt;</span>false<span class="nt">&lt;/PreProcessed&gt;</span> <span class="w"> </span><span class="nt">&lt;Name&gt;</span>Module:ISO<span class="w"> </span>639<span class="w"> </span>name/ISO<span class="w"> </span>639-1<span class="nt">&lt;/Name&gt;</span> <span class="w"> </span><span class="nt">&lt;/Article&gt;</span> <span class="w"> </span><span class="nt">&lt;/ArticleList&gt;</span> <span class="w"> </span><span class="nt">&lt;/List&gt;</span> <span class="w"> </span><span class="nt">&lt;FindAndReplace&gt;</span> <span class="w"> </span><span class="nt">&lt;Enabled&gt;</span>false<span class="nt">&lt;/Enabled&gt;</span> <span class="w"> </span><span class="nt">&lt;IgnoreSomeText&gt;</span>false<span class="nt">&lt;/IgnoreSomeText&gt;</span> <span class="w"> </span><span class="nt">&lt;IgnoreMoreText&gt;</span>false<span class="nt">&lt;/IgnoreMoreText&gt;</span> <span class="w"> </span><span class="nt">&lt;AppendSummary&gt;</span>false<span class="nt">&lt;/AppendSummary&gt;</span> <span class="w"> </span><span class="nt">&lt;Replacements</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;AdvancedReps</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;SubstTemplates</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;IncludeComments&gt;</span>false<span class="nt">&lt;/IncludeComments&gt;</span> <span class="w"> </span><span class="nt">&lt;ExpandRecursively&gt;</span>true<span class="nt">&lt;/ExpandRecursively&gt;</span> <span class="w"> </span><span class="nt">&lt;IgnoreUnformatted&gt;</span>false<span class="nt">&lt;/IgnoreUnformatted&gt;</span> <span class="w"> </span><span class="nt">&lt;/FindAndReplace&gt;</span> <span class="w"> </span><span class="nt">&lt;Editprefs&gt;</span> <span class="w"> </span><span class="nt">&lt;GeneralFixes&gt;</span>false<span class="nt">&lt;/GeneralFixes&gt;</span> <span class="w"> </span><span class="nt">&lt;Tagger&gt;</span>false<span class="nt">&lt;/Tagger&gt;</span> <span class="w"> </span><span class="nt">&lt;Unicodify&gt;</span>false<span class="nt">&lt;/Unicodify&gt;</span> <span class="w"> </span><span class="nt">&lt;Recategorisation&gt;</span>0<span class="nt">&lt;/Recategorisation&gt;</span> <span class="w"> </span><span class="nt">&lt;NewCategory</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;NewCategory2</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;ReImage&gt;</span>0<span class="nt">&lt;/ReImage&gt;</span> <span class="w"> </span><span class="nt">&lt;ImageFind</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;Replace</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;SkipIfNoCatChange&gt;</span>false<span class="nt">&lt;/SkipIfNoCatChange&gt;</span> <span class="w"> </span><span class="nt">&lt;RemoveSortKey&gt;</span>false<span class="nt">&lt;/RemoveSortKey&gt;</span> <span class="w"> </span><span class="nt">&lt;SkipIfNoImgChange&gt;</span>false<span class="nt">&lt;/SkipIfNoImgChange&gt;</span> <span class="w"> </span><span class="nt">&lt;AppendText&gt;</span>false<span class="nt">&lt;/AppendText&gt;</span> <span class="w"> </span><span class="nt">&lt;AppendTextMetaDataSort&gt;</span>false<span class="nt">&lt;/AppendTextMetaDataSort&gt;</span> <span class="w"> </span><span class="nt">&lt;Append&gt;</span>false<span class="nt">&lt;/Append&gt;</span> <span class="w"> </span><span class="nt">&lt;Text</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;Newlines&gt;</span>0<span class="nt">&lt;/Newlines&gt;</span> <span class="w"> </span><span class="nt">&lt;AutoDelay&gt;</span>0<span class="nt">&lt;/AutoDelay&gt;</span> <span class="w"> </span><span class="nt">&lt;BotMaxEdits&gt;</span>0<span class="nt">&lt;/BotMaxEdits&gt;</span> <span class="w"> </span><span class="nt">&lt;SupressTag&gt;</span>false<span class="nt">&lt;/SupressTag&gt;</span> <span class="w"> </span><span class="nt">&lt;RegexTypoFix&gt;</span>false<span class="nt">&lt;/RegexTypoFix&gt;</span> <span class="w"> </span><span class="nt">&lt;/Editprefs&gt;</span> <span class="w"> </span><span class="nt">&lt;General&gt;</span> <span class="w"> </span><span class="nt">&lt;AutoSaveEdit&gt;</span> <span class="w"> </span><span class="nt">&lt;Enabled&gt;</span>false<span class="nt">&lt;/Enabled&gt;</span> <span class="w"> </span><span class="nt">&lt;SavePeriod&gt;</span>30<span class="nt">&lt;/SavePeriod&gt;</span> <span class="w"> </span><span class="nt">&lt;SaveFile</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;/AutoSaveEdit&gt;</span> <span class="w"> </span><span class="nt">&lt;SelectedSummary</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;Summaries&gt;</span> <span class="w"> </span><span class="nt">&lt;string&gt;</span>clean<span class="w"> </span>up<span class="nt">&lt;/string&gt;</span> <span class="w"> </span><span class="nt">&lt;string&gt;</span>re-categorisation<span class="w"> </span>per<span class="w"> </span>[[WP:CFD|CFD]]<span class="nt">&lt;/string&gt;</span> <span class="w"> </span><span class="nt">&lt;string&gt;</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">&lt;/string&gt;</span> <span class="w"> </span><span class="nt">&lt;string&gt;</span>removing<span class="w"> </span>category<span class="w"> </span>per<span class="w"> </span>[[WP:CFD|CFD]]<span class="nt">&lt;/string&gt;</span> <span class="w"> </span><span class="nt">&lt;string&gt;</span>[[Wikipedia:Template<span class="w"> </span>substitution|subst:&#39;ing]]<span class="nt">&lt;/string&gt;</span> <span class="w"> </span><span class="nt">&lt;string&gt;</span>[[Wikipedia:WikiProject<span class="w"> </span>Stub<span class="w"> </span>sorting|stub<span class="w"> </span>sorting]]<span class="nt">&lt;/string&gt;</span> <span class="w"> </span><span class="nt">&lt;string&gt;</span>[[WP:AWB/T|Typo<span class="w"> </span>fixing]]<span class="nt">&lt;/string&gt;</span> <span class="w"> </span><span class="nt">&lt;string&gt;</span>bad<span class="w"> </span>link<span class="w"> </span>repair<span class="nt">&lt;/string&gt;</span> <span class="w"> </span><span class="nt">&lt;string&gt;</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">&lt;/string&gt;</span> <span class="w"> </span><span class="nt">&lt;string&gt;</span>Unicodifying<span class="nt">&lt;/string&gt;</span> <span class="w"> </span><span class="nt">&lt;string&gt;</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">&lt;/string&gt;</span> <span class="w"> </span><span class="nt">&lt;/Summaries&gt;</span> <span class="w"> </span><span class="nt">&lt;PasteMore&gt;</span> <span class="w"> </span><span class="nt">&lt;string</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;string</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;string</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;string</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;string</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;string</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;string</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;string</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;string</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;string</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;/PasteMore&gt;</span> <span class="w"> </span><span class="nt">&lt;FindText</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;FindRegex&gt;</span>false<span class="nt">&lt;/FindRegex&gt;</span> <span class="w"> </span><span class="nt">&lt;FindCaseSensitive&gt;</span>false<span class="nt">&lt;/FindCaseSensitive&gt;</span> <span class="w"> </span><span class="nt">&lt;WordWrap&gt;</span>true<span class="nt">&lt;/WordWrap&gt;</span> <span class="w"> </span><span class="nt">&lt;ToolBarEnabled&gt;</span>false<span class="nt">&lt;/ToolBarEnabled&gt;</span> <span class="w"> </span><span class="nt">&lt;BypassRedirect&gt;</span>true<span class="nt">&lt;/BypassRedirect&gt;</span> <span class="w"> </span><span class="nt">&lt;AutoSaveSettings&gt;</span>false<span class="nt">&lt;/AutoSaveSettings&gt;</span> <span class="w"> </span><span class="nt">&lt;noSectionEditSummary&gt;</span>true<span class="nt">&lt;/noSectionEditSummary&gt;</span> <span class="w"> </span><span class="nt">&lt;restrictDefaultsortAddition&gt;</span>true<span class="nt">&lt;/restrictDefaultsortAddition&gt;</span> <span class="w"> </span><span class="nt">&lt;restrictOrphanTagging&gt;</span>true<span class="nt">&lt;/restrictOrphanTagging&gt;</span> <span class="w"> </span><span class="nt">&lt;noMOSComplianceFixes&gt;</span>false<span class="nt">&lt;/noMOSComplianceFixes&gt;</span> <span class="w"> </span><span class="nt">&lt;syntaxHighlightEditBox&gt;</span>false<span class="nt">&lt;/syntaxHighlightEditBox&gt;</span> <span class="w"> </span><span class="nt">&lt;highlightAllFind&gt;</span>false<span class="nt">&lt;/highlightAllFind&gt;</span> <span class="w"> </span><span class="nt">&lt;PreParseMode&gt;</span>false<span class="nt">&lt;/PreParseMode&gt;</span> <span class="w"> </span><span class="nt">&lt;NoAutoChanges&gt;</span>false<span class="nt">&lt;/NoAutoChanges&gt;</span> <span class="w"> </span><span class="nt">&lt;OnLoadAction&gt;</span>0<span class="nt">&lt;/OnLoadAction&gt;</span> <span class="w"> </span><span class="nt">&lt;DiffInBotMode&gt;</span>false<span class="nt">&lt;/DiffInBotMode&gt;</span> <span class="w"> </span><span class="nt">&lt;Minor&gt;</span>true<span class="nt">&lt;/Minor&gt;</span> <span class="w"> </span><span class="nt">&lt;AddToWatchlist&gt;</span>2<span class="nt">&lt;/AddToWatchlist&gt;</span> <span class="w"> </span><span class="nt">&lt;TimerEnabled&gt;</span>false<span class="nt">&lt;/TimerEnabled&gt;</span> <span class="w"> </span><span class="nt">&lt;SortListAlphabetically&gt;</span>false<span class="nt">&lt;/SortListAlphabetically&gt;</span> <span class="w"> </span><span class="nt">&lt;AddIgnoredToLog&gt;</span>false<span class="nt">&lt;/AddIgnoredToLog&gt;</span> <span class="w"> </span><span class="nt">&lt;EditToolbarEnabled&gt;</span>false<span class="nt">&lt;/EditToolbarEnabled&gt;</span> <span class="w"> </span><span class="nt">&lt;filterNonMainSpace&gt;</span>false<span class="nt">&lt;/filterNonMainSpace&gt;</span> <span class="w"> </span><span class="nt">&lt;AutoFilterDuplicates&gt;</span>false<span class="nt">&lt;/AutoFilterDuplicates&gt;</span> <span class="w"> </span><span class="nt">&lt;FocusAtEndOfEditBox&gt;</span>false<span class="nt">&lt;/FocusAtEndOfEditBox&gt;</span> <span class="w"> </span><span class="nt">&lt;scrollToUnbalancedBrackets&gt;</span>false<span class="nt">&lt;/scrollToUnbalancedBrackets&gt;</span> <span class="w"> </span><span class="nt">&lt;TextBoxSize&gt;</span>10<span class="nt">&lt;/TextBoxSize&gt;</span> <span class="w"> </span><span class="nt">&lt;TextBoxFont&gt;</span>Courier<span class="w"> </span>New<span class="nt">&lt;/TextBoxFont&gt;</span> <span class="w"> </span><span class="nt">&lt;LowThreadPriority&gt;</span>false<span class="nt">&lt;/LowThreadPriority&gt;</span> <span class="w"> </span><span class="nt">&lt;Beep&gt;</span>false<span class="nt">&lt;/Beep&gt;</span> <span class="w"> </span><span class="nt">&lt;Flash&gt;</span>false<span class="nt">&lt;/Flash&gt;</span> <span class="w"> </span><span class="nt">&lt;Minimize&gt;</span>false<span class="nt">&lt;/Minimize&gt;</span> <span class="w"> </span><span class="nt">&lt;LockSummary&gt;</span>false<span class="nt">&lt;/LockSummary&gt;</span> <span class="w"> </span><span class="nt">&lt;SaveArticleList&gt;</span>true<span class="nt">&lt;/SaveArticleList&gt;</span> <span class="w"> </span><span class="nt">&lt;SuppressUsingAWB&gt;</span>false<span class="nt">&lt;/SuppressUsingAWB&gt;</span> <span class="w"> </span><span class="nt">&lt;AddUsingAWBToActionSummaries&gt;</span>false<span class="nt">&lt;/AddUsingAWBToActionSummaries&gt;</span> <span class="w"> </span><span class="nt">&lt;IgnoreNoBots&gt;</span>false<span class="nt">&lt;/IgnoreNoBots&gt;</span> <span class="w"> </span><span class="nt">&lt;ClearPageListOnProjectChange&gt;</span>false<span class="nt">&lt;/ClearPageListOnProjectChange&gt;</span> <span class="w"> </span><span class="nt">&lt;SortInterWikiOrder&gt;</span>true<span class="nt">&lt;/SortInterWikiOrder&gt;</span> <span class="w"> </span><span class="nt">&lt;ReplaceReferenceTags&gt;</span>true<span class="nt">&lt;/ReplaceReferenceTags&gt;</span> <span class="w"> </span><span class="nt">&lt;LoggingEnabled&gt;</span>true<span class="nt">&lt;/LoggingEnabled&gt;</span> <span class="w"> </span><span class="nt">&lt;AlertPreferences</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;/General&gt;</span> <span class="w"> </span><span class="nt">&lt;SkipOptions&gt;</span> <span class="w"> </span><span class="nt">&lt;SkipNonexistent&gt;</span>true<span class="nt">&lt;/SkipNonexistent&gt;</span> <span class="w"> </span><span class="nt">&lt;Skipexistent&gt;</span>false<span class="nt">&lt;/Skipexistent&gt;</span> <span class="w"> </span><span class="nt">&lt;SkipDontCare&gt;</span>false<span class="nt">&lt;/SkipDontCare&gt;</span> <span class="w"> </span><span class="nt">&lt;SkipWhenNoChanges&gt;</span>false<span class="nt">&lt;/SkipWhenNoChanges&gt;</span> <span class="w"> </span><span class="nt">&lt;SkipSpamFilterBlocked&gt;</span>false<span class="nt">&lt;/SkipSpamFilterBlocked&gt;</span> <span class="w"> </span><span class="nt">&lt;SkipInuse&gt;</span>false<span class="nt">&lt;/SkipInuse&gt;</span> <span class="w"> </span><span class="nt">&lt;SkipWhenOnlyWhitespaceChanged&gt;</span>false<span class="nt">&lt;/SkipWhenOnlyWhitespaceChanged&gt;</span> <span class="w"> </span><span class="nt">&lt;SkipOnlyGeneralFixChanges&gt;</span>true<span class="nt">&lt;/SkipOnlyGeneralFixChanges&gt;</span> <span class="w"> </span><span class="nt">&lt;SkipOnlyMinorGeneralFixChanges&gt;</span>false<span class="nt">&lt;/SkipOnlyMinorGeneralFixChanges&gt;</span> <span class="w"> </span><span class="nt">&lt;SkipOnlyCosmetic&gt;</span>false<span class="nt">&lt;/SkipOnlyCosmetic&gt;</span> <span class="w"> </span><span class="nt">&lt;SkipOnlyCasingChanged&gt;</span>false<span class="nt">&lt;/SkipOnlyCasingChanged&gt;</span> <span class="w"> </span><span class="nt">&lt;SkipIfRedirect&gt;</span>false<span class="nt">&lt;/SkipIfRedirect&gt;</span> <span class="w"> </span><span class="nt">&lt;SkipIfNoAlerts&gt;</span>false<span class="nt">&lt;/SkipIfNoAlerts&gt;</span> <span class="w"> </span><span class="nt">&lt;SkipDoes&gt;</span>false<span class="nt">&lt;/SkipDoes&gt;</span> <span class="w"> </span><span class="nt">&lt;SkipDoesText</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;SkipDoesRegex&gt;</span>false<span class="nt">&lt;/SkipDoesRegex&gt;</span> <span class="w"> </span><span class="nt">&lt;SkipDoesCaseSensitive&gt;</span>false<span class="nt">&lt;/SkipDoesCaseSensitive&gt;</span> <span class="w"> </span><span class="nt">&lt;SkipDoesAfterProcessing&gt;</span>false<span class="nt">&lt;/SkipDoesAfterProcessing&gt;</span> <span class="w"> </span><span class="nt">&lt;SkipDoesNot&gt;</span>false<span class="nt">&lt;/SkipDoesNot&gt;</span> <span class="w"> </span><span class="nt">&lt;SkipDoesNotText</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;SkipDoesNotRegex&gt;</span>false<span class="nt">&lt;/SkipDoesNotRegex&gt;</span> <span class="w"> </span><span class="nt">&lt;SkipDoesNotCaseSensitive&gt;</span>false<span class="nt">&lt;/SkipDoesNotCaseSensitive&gt;</span> <span class="w"> </span><span class="nt">&lt;SkipDoesNotAfterProcessing&gt;</span>false<span class="nt">&lt;/SkipDoesNotAfterProcessing&gt;</span> <span class="w"> </span><span class="nt">&lt;SkipNoFindAndReplace&gt;</span>false<span class="nt">&lt;/SkipNoFindAndReplace&gt;</span> <span class="w"> </span><span class="nt">&lt;SkipMinorFindAndReplace&gt;</span>false<span class="nt">&lt;/SkipMinorFindAndReplace&gt;</span> <span class="w"> </span><span class="nt">&lt;SkipNoRegexTypoFix&gt;</span>false<span class="nt">&lt;/SkipNoRegexTypoFix&gt;</span> <span class="w"> </span><span class="nt">&lt;SkipNoDisambiguation&gt;</span>false<span class="nt">&lt;/SkipNoDisambiguation&gt;</span> <span class="w"> </span><span class="nt">&lt;SkipNoLinksOnPage&gt;</span>false<span class="nt">&lt;/SkipNoLinksOnPage&gt;</span> <span class="w"> </span><span class="nt">&lt;GeneralSkipList</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;/SkipOptions&gt;</span> <span class="w"> </span><span class="nt">&lt;Module&gt;</span> <span class="w"> </span><span class="nt">&lt;Enabled&gt;</span>true<span class="nt">&lt;/Enabled&gt;</span> <span class="w"> </span><span class="nt">&lt;Language&gt;</span>C#<span class="w"> </span>3.5<span class="nt">&lt;/Language&gt;</span> <span class="w"> </span><span class="nt">&lt;Code&gt;</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">&amp;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">&amp;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>&quot;ERROR:<span class="w"> </span>&quot;<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>&quot;update<span class="w"> </span>to<span class="w"> </span>&quot;<span class="w"> </span>+<span class="w"> </span>file_date.Split<span class="w"> </span>(&#39;:&#39;)[1].Trim()<span class="w"> </span>+<span class="w"> </span>&quot;<span class="w"> </span>data;&quot;; <span class="w"> </span>else <span class="w"> </span>Summary<span class="w"> </span>=<span class="w"> </span>&quot;DEBUG:<span class="w"> </span>&quot;<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>&quot;Module:ISO<span class="w"> </span>639<span class="w"> </span>name/ISO<span class="w"> </span>639-1&quot;: <span class="w"> </span>replacement<span class="w"> </span>=<span class="w"> </span>String.Join(&quot;,\n\t&quot;,<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>&quot;Module:Lang/data/iana<span class="w"> </span>languages&quot;: //<span class="w"> </span>replacement<span class="w"> </span>=<span class="w"> </span>String.Join(&quot;,\n\t&quot;,<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>&quot;Module:Lang/data/iana<span class="w"> </span>languages&quot;: <span class="w"> </span>string<span class="w"> </span>active<span class="w"> </span>=<span class="w"> </span>String.Join(&quot;,\n\t&quot;,<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(&quot;,\n\t&quot;,<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>&quot;--<span class="w"> </span>&quot;<span class="w"> </span>+<span class="w"> </span>file_date<span class="w"> </span>+<span class="w"> </span>&quot;\nlocal<span class="w"> </span>active<span class="w"> </span>=<span class="w"> </span>{\n\t&quot;<span class="w"> </span>+<span class="w"> </span>active<span class="w"> </span>+<span class="w"> </span>&quot;\n\t}\n\nlocal<span class="w"> </span>deprecated<span class="w"> </span>=<span class="w"> </span>{\n\t&quot;<span class="w"> </span>+<span class="w"> </span>deprecated<span class="w"> </span>+<span class="w"> </span>&quot;\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}&quot;; <span class="w"> </span> <span class="w"> </span>case<span class="w"> </span>&quot;Module:Lang/data/iana<span class="w"> </span>scripts&quot;: <span class="w"> </span>replacement<span class="w"> </span>=<span class="w"> </span>String.Join(&quot;,\n\t&quot;,<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>&quot;Module:Lang/data/iana<span class="w"> </span>regions&quot;: <span class="w"> </span>replacement<span class="w"> </span>=<span class="w"> </span>String.Join(&quot;,\n\t&quot;,<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>&quot;Module:Lang/data/iana<span class="w"> </span>suppressed<span class="w"> </span>scripts&quot;: <span class="w"> </span>List<span class="ni">&amp;lt;</span>string<span class="ni">&amp;gt;</span><span class="w"> </span>temp<span class="w"> </span>=<span class="w"> </span>new<span class="w"> </span>List<span class="ni">&amp;lt;</span>string<span class="ni">&amp;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">&amp;lt;</span>string,<span class="w"> </span>string<span class="ni">&amp;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>&quot;[\&quot;&quot;<span class="w"> </span>+<span class="w"> </span>kvp.Key<span class="w"> </span>+<span class="w"> </span>&quot;\&quot;]<span class="w"> </span>=<span class="w"> </span>&quot;; <span class="w"> </span>subtags_array<span class="w"> </span>=<span class="w"> </span>kvp.Value.Split<span class="w"> </span>(&#39;,&#39;); <span class="w"> </span>temp.Add<span class="w"> </span>(script<span class="w"> </span>+<span class="w"> </span>&quot;{&quot;<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>&quot;}&quot;); <span class="w"> </span>} <span class="w"> </span>replacement<span class="w"> </span>=<span class="w"> </span>String.Join(&quot;,\n\t&quot;,<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>&quot;Module:Lang/data/iana<span class="w"> </span>variants&quot;: <span class="w"> </span>replacement<span class="w"> </span>=<span class="w"> </span>String.Join(&quot;,\n\t&quot;,<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>&quot;Unexpected<span class="w"> </span>article:<span class="w"> </span>&quot;<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>&quot;--<span class="w"> </span>&quot;<span class="w"> </span>+<span class="w"> </span>file_date<span class="w"> </span>+<span class="w"> </span>&quot;\nreturn<span class="w"> </span>{\n\t&quot;<span class="w"> </span>+<span class="w"> </span>replacement<span class="w"> </span>+<span class="w"> </span>&quot;\n\t}&quot;;<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">&amp;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">&amp;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">&amp;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>(&quot;,<span class="w"> </span>&quot;,<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">&amp;lt;</span>string<span class="ni">&amp;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">&amp;lt;</span>string<span class="ni">&amp;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">&amp;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">&amp;gt;</span><span class="w"> </span>count)<span class="w"> </span><span class="ni">&amp;amp;&amp;amp;</span><span class="w"> </span>(subtags_array.Length<span class="w"> </span><span class="ni">&amp;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>&quot;,<span class="w"> </span>&quot;<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>(&quot;,\n\t\t\t\t&quot;,<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">&amp;lt;&amp;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">&amp;gt;&amp;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>&#39;files&#39;<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">&amp;lt;</span>new<span class="w"> </span>text<span class="w"> </span>for<span class="w"> </span>ArticleTitle<span class="ni">&amp;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&#39;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">&amp;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">&amp;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>&quot;https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry&quot;; <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>&quot;Z:\\Wikipedia\\language-subtag-registry_2020-07-17.txt&quot;; <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">&amp;lt;</span>string<span class="ni">&amp;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">&amp;lt;</span>string<span class="ni">&amp;gt;</span>(); <span class="w"> </span>static<span class="w"> </span>List<span class="ni">&amp;lt;</span>string<span class="ni">&amp;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">&amp;lt;</span>string<span class="ni">&amp;gt;</span>(); <span class="w"> </span>static<span class="w"> </span>List<span class="ni">&amp;lt;</span>string<span class="ni">&amp;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">&amp;lt;</span>string<span class="ni">&amp;gt;</span>(); <span class="w"> </span>static<span class="w"> </span>List<span class="ni">&amp;lt;</span>string<span class="ni">&amp;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">&amp;lt;</span>string<span class="ni">&amp;gt;</span>(); <span class="w"> </span>static<span class="w"> </span>List<span class="ni">&amp;lt;</span>string<span class="ni">&amp;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">&amp;lt;</span>string<span class="ni">&amp;gt;</span>(); <span class="w"> </span>static<span class="w"> </span>SortedList<span class="ni">&amp;lt;</span>string,<span class="w"> </span>string<span class="ni">&amp;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">&amp;lt;</span>string,<span class="w"> </span>string<span class="ni">&amp;gt;</span>(); <span class="w"> </span>static<span class="w"> </span>List<span class="ni">&amp;lt;</span>string<span class="ni">&amp;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">&amp;lt;</span>string<span class="ni">&amp;gt;</span>(); //---------------------------<span class="ni">&amp;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">&amp;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>@&quot;&quot;; <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>&quot;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)&quot;; <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>&quot;file<span class="w"> </span>not<span class="w"> </span>found:<span class="w"> </span>&quot;<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>&quot;Exception<span class="w"> </span>occurred<span class="w"> </span>reading:<span class="w"> </span>&quot;<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>&quot;Exception<span class="w"> </span>occurred<span class="w"> </span>reading:<span class="w"> </span>&quot;<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>{&quot;%%&quot;},<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>(&#39;\n&#39;);<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>&quot;Type:<span class="w"> </span>language&quot;: <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>&quot;Type:<span class="w"> </span>script&quot;: <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>&quot;Type:<span class="w"> </span>region&quot;: <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>&quot;Type:<span class="w"> </span>variant&quot;: <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">&amp;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">&amp;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">&amp;lt;</span>string<span class="ni">&amp;gt;</span><span class="w"> </span>prefixes<span class="w"> </span>=<span class="w"> </span>new<span class="w"> </span>List<span class="ni">&amp;lt;</span>string<span class="ni">&amp;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(&#39;:&#39;); <span class="w"> </span>if<span class="w"> </span>(0<span class="w"> </span>==<span class="w"> </span>element_parts[0].IndexOf(&quot;<span class="w"> </span>&quot;))<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>&quot;<span class="w"> </span>&quot;<span class="w"> </span>+<span class="w"> </span>element_parts[0].Substring(2)<span class="w"> </span>+<span class="w"> </span>&quot;\&quot;&quot;;<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>(&quot;Subtag&quot;,<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>(&quot;Description&quot;,<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>&quot;\&quot;&quot;,<span class="w"> </span>&quot;\\\&quot;&quot;); <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>&quot;\&quot;&quot;<span class="w"> </span>+<span class="w"> </span>description<span class="w"> </span>+<span class="w"> </span>&quot;\&quot;&quot;; <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>&quot;,<span class="w"> </span>\&quot;&quot;<span class="w"> </span>+<span class="w"> </span>description<span class="w"> </span>+<span class="w"> </span>&quot;\&quot;&quot;; <span class="w"> </span>} <span class="w"> </span>if<span class="w"> </span>(String.Equals<span class="w"> </span>(&quot;Prefix&quot;,<span class="w"> </span>element_parts[0])) <span class="w"> </span>prefixes.Add<span class="w"> </span>(&quot;\&quot;&quot;<span class="w"> </span>+<span class="w"> </span>element_parts[1].Trim().ToLower()<span class="w"> </span>+<span class="w"> </span>&quot;\&quot;&quot;); <span class="w"> </span>if<span class="w"> </span>(String.Equals<span class="w"> </span>(&quot;Deprecated&quot;,<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>(&quot;Comments&quot;,<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>&quot;[\&quot;descriptions\&quot;]<span class="w"> </span>=<span class="w"> </span>{&quot;<span class="w"> </span>+<span class="w"> </span>description_list<span class="w"> </span>+<span class="w"> </span>&quot;},&quot;; <span class="w"> </span>prefix_list<span class="w"> </span>=<span class="w"> </span>&quot;[\&quot;prefixes\&quot;]<span class="w"> </span>=<span class="w"> </span>{&quot;<span class="w"> </span>+<span class="w"> </span>String.Join<span class="w"> </span>(&quot;,<span class="w"> </span>&quot;,<span class="w"> </span>prefixes.ToArray())<span class="w"> </span>+<span class="w"> </span>&quot;},&quot;; <span class="w"> </span>iana_variants.Add<span class="w"> </span>(&quot;[\&quot;&quot;<span class="w"> </span>+<span class="w"> </span>variant.Trim()<span class="w"> </span>+<span class="w"> </span>&quot;\&quot;]<span class="w"> </span>=<span class="w"> </span>&quot;<span class="w"> </span>+<span class="w"> </span>&quot;{\n\t\t&quot;<span class="w"> </span>+<span class="w"> </span>description_list<span class="w"> </span>+<span class="w"> </span>&quot;\n\t\t&quot;<span class="w"> </span>+<span class="w"> </span>prefix_list<span class="w"> </span>+<span class="w"> </span>&quot;\n\t\t}&quot;); <span class="w"> </span>} //---------------------------<span class="ni">&amp;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">&amp;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">&amp;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">&amp;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">&amp;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">&amp;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">&amp;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">&amp;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>&quot;&quot;; <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(&#39;:&#39;); <span class="w"> </span>if<span class="w"> </span>(0<span class="w"> </span>==<span class="w"> </span>element_parts[0].IndexOf(&quot;<span class="w"> </span>&quot;))<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>&quot;<span class="w"> </span>&quot;<span class="w"> </span>+<span class="w"> </span>element_parts[0].Substring(2)<span class="w"> </span>+<span class="w"> </span>&quot;\&quot;&quot;;<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>(&quot;Subtag&quot;,<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>(&quot;Description&quot;,<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>(&quot;Private<span class="w"> </span>use&quot;,<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>&quot;\&quot;&quot;<span class="w"> </span>+<span class="w"> </span>element_parts[1].Trim()<span class="w"> </span>+<span class="w"> </span>&quot;\&quot;&quot;; <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>&quot;,<span class="w"> </span>\&quot;&quot;<span class="w"> </span>+<span class="w"> </span>element_parts[1].Trim()<span class="w"> </span>+<span class="w"> </span>&quot;\&quot;&quot;; <span class="w"> </span>} <span class="w"> </span>if<span class="w"> </span>(String.Equals<span class="w"> </span>(&quot;Suppress-Script&quot;,<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&#39;s<span class="w"> </span>list <span class="w"> </span>if<span class="w"> </span>(String.Equals<span class="w"> </span>(&quot;Deprecated&quot;,<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>(&quot;Type:<span class="w"> </span>language&quot;,<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>(&quot;Comments&quot;,<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>&quot;[\&quot;&quot;<span class="w"> </span>+<span class="w"> </span>subtag.Trim()<span class="w"> </span>+<span class="w"> </span>&quot;\&quot;]<span class="w"> </span>=<span class="w"> </span>&quot;<span class="w"> </span>+<span class="w"> </span>&quot;{&quot;<span class="w"> </span>+<span class="w"> </span>names<span class="w"> </span>+<span class="w"> </span>&quot;}&quot;; <span class="w"> </span>} //---------------------------<span class="ni">&amp;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">&amp;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&#39;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>&quot;,\&quot;&quot;<span class="w"> </span>+<span class="w"> </span>subtag<span class="w"> </span>+<span class="w"> </span>&quot;\&quot;&quot;;<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>&quot;\&quot;&quot;<span class="w"> </span>+<span class="w"> </span>subtag<span class="w"> </span>+<span class="w"> </span>&quot;\&quot;&quot;);<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">&lt;/Code&gt;</span> <span class="w"> </span><span class="nt">&lt;/Module&gt;</span> <span class="w"> </span><span class="nt">&lt;ExternalProgram&gt;</span> <span class="w"> </span><span class="nt">&lt;Enabled&gt;</span>false<span class="nt">&lt;/Enabled&gt;</span> <span class="w"> </span><span class="nt">&lt;Skip&gt;</span>false<span class="nt">&lt;/Skip&gt;</span> <span class="w"> </span><span class="nt">&lt;Program</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;Parameters</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;PassAsFile&gt;</span>true<span class="nt">&lt;/PassAsFile&gt;</span> <span class="w"> </span><span class="nt">&lt;OutputFile</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;/ExternalProgram&gt;</span> <span class="w"> </span><span class="nt">&lt;Disambiguation&gt;</span> <span class="w"> </span><span class="nt">&lt;Enabled&gt;</span>false<span class="nt">&lt;/Enabled&gt;</span> <span class="w"> </span><span class="nt">&lt;Link</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;Variants</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;ContextChars&gt;</span>20<span class="nt">&lt;/ContextChars&gt;</span> <span class="w"> </span><span class="nt">&lt;/Disambiguation&gt;</span> <span class="w"> </span><span class="nt">&lt;Special&gt;</span> <span class="w"> </span><span class="nt">&lt;namespaceValues</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;remDupes&gt;</span>true<span class="nt">&lt;/remDupes&gt;</span> <span class="w"> </span><span class="nt">&lt;sortAZ&gt;</span>true<span class="nt">&lt;/sortAZ&gt;</span> <span class="w"> </span><span class="nt">&lt;filterTitlesThatContain&gt;</span>false<span class="nt">&lt;/filterTitlesThatContain&gt;</span> <span class="w"> </span><span class="nt">&lt;filterTitlesThatContainText</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;filterTitlesThatDontContain&gt;</span>false<span class="nt">&lt;/filterTitlesThatDontContain&gt;</span> <span class="w"> </span><span class="nt">&lt;filterTitlesThatDontContainText</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;areRegex&gt;</span>false<span class="nt">&lt;/areRegex&gt;</span> <span class="w"> </span><span class="nt">&lt;opType&gt;</span>0<span class="nt">&lt;/opType&gt;</span> <span class="w"> </span><span class="nt">&lt;remove</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;/Special&gt;</span> <span class="w"> </span><span class="nt">&lt;Tool&gt;</span> <span class="w"> </span><span class="nt">&lt;ListComparerUseCurrentArticleList&gt;</span>0<span class="nt">&lt;/ListComparerUseCurrentArticleList&gt;</span> <span class="w"> </span><span class="nt">&lt;ListSplitterUseCurrentArticleList&gt;</span>0<span class="nt">&lt;/ListSplitterUseCurrentArticleList&gt;</span> <span class="w"> </span><span class="nt">&lt;DatabaseScannerUseCurrentArticleList&gt;</span>0<span class="nt">&lt;/DatabaseScannerUseCurrentArticleList&gt;</span> <span class="w"> </span><span class="nt">&lt;/Tool&gt;</span> <span class="w"> </span><span class="nt">&lt;Plugin&gt;</span> <span class="w"> </span><span class="nt">&lt;PluginPrefs&gt;</span> <span class="w"> </span><span class="nt">&lt;Name&gt;</span>CSV<span class="w"> </span>Loader<span class="nt">&lt;/Name&gt;</span> <span class="w"> </span><span class="nt">&lt;PluginSettings&gt;</span> <span class="w"> </span><span class="nt">&lt;anyType</span><span class="w"> </span><span class="na">xsi:type=</span><span class="s">&quot;PrefsKeyPair&quot;</span><span class="nt">&gt;</span> <span class="w"> </span><span class="nt">&lt;Name&gt;</span>TextMode<span class="nt">&lt;/Name&gt;</span> <span class="w"> </span><span class="nt">&lt;Setting</span><span class="w"> </span><span class="na">xsi:type=</span><span class="s">&quot;xsd:string&quot;</span><span class="nt">&gt;</span>Append<span class="nt">&lt;/Setting&gt;</span> <span class="w"> </span><span class="nt">&lt;/anyType&gt;</span> <span class="w"> </span><span class="nt">&lt;anyType</span><span class="w"> </span><span class="na">xsi:type=</span><span class="s">&quot;PrefsKeyPair&quot;</span><span class="nt">&gt;</span> <span class="w"> </span><span class="nt">&lt;Name&gt;</span>InputText<span class="nt">&lt;/Name&gt;</span> <span class="w"> </span><span class="nt">&lt;Setting</span><span class="w"> </span><span class="na">xsi:type=</span><span class="s">&quot;xsd:string&quot;</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;/anyType&gt;</span> <span class="w"> </span><span class="nt">&lt;anyType</span><span class="w"> </span><span class="na">xsi:type=</span><span class="s">&quot;PrefsKeyPair&quot;</span><span class="nt">&gt;</span> <span class="w"> </span><span class="nt">&lt;Name&gt;</span>ColumnHeaders<span class="nt">&lt;/Name&gt;</span> <span class="w"> </span><span class="nt">&lt;Setting</span><span class="w"> </span><span class="na">xsi:type=</span><span class="s">&quot;xsd:string&quot;</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;/anyType&gt;</span> <span class="w"> </span><span class="nt">&lt;anyType</span><span class="w"> </span><span class="na">xsi:type=</span><span class="s">&quot;PrefsKeyPair&quot;</span><span class="nt">&gt;</span> <span class="w"> </span><span class="nt">&lt;Name&gt;</span>Skip<span class="nt">&lt;/Name&gt;</span> <span class="w"> </span><span class="nt">&lt;Setting</span><span class="w"> </span><span class="na">xsi:type=</span><span class="s">&quot;xsd:boolean&quot;</span><span class="nt">&gt;</span>true<span class="nt">&lt;/Setting&gt;</span> <span class="w"> </span><span class="nt">&lt;/anyType&gt;</span> <span class="w"> </span><span class="nt">&lt;anyType</span><span class="w"> </span><span class="na">xsi:type=</span><span class="s">&quot;PrefsKeyPair&quot;</span><span class="nt">&gt;</span> <span class="w"> </span><span class="nt">&lt;Name&gt;</span>Separator<span class="nt">&lt;/Name&gt;</span> <span class="w"> </span><span class="nt">&lt;Setting</span><span class="w"> </span><span class="na">xsi:type=</span><span class="s">&quot;xsd:string&quot;</span><span class="nt">&gt;</span>,<span class="nt">&lt;/Setting&gt;</span> <span class="w"> </span><span class="nt">&lt;/anyType&gt;</span> <span class="w"> </span><span class="nt">&lt;anyType</span><span class="w"> </span><span class="na">xsi:type=</span><span class="s">&quot;PrefsKeyPair&quot;</span><span class="nt">&gt;</span> <span class="w"> </span><span class="nt">&lt;Name&gt;</span>CreateLists<span class="nt">&lt;/Name&gt;</span> <span class="w"> </span><span class="nt">&lt;Setting</span><span class="w"> </span><span class="na">xsi:type=</span><span class="s">&quot;xsd:boolean&quot;</span><span class="nt">&gt;</span>false<span class="nt">&lt;/Setting&gt;</span> <span class="w"> </span><span class="nt">&lt;/anyType&gt;</span> <span class="w"> </span><span class="nt">&lt;anyType</span><span class="w"> </span><span class="na">xsi:type=</span><span class="s">&quot;PrefsKeyPair&quot;</span><span class="nt">&gt;</span> <span class="w"> </span><span class="nt">&lt;Name&gt;</span>ListSeparator<span class="nt">&lt;/Name&gt;</span> <span class="w"> </span><span class="nt">&lt;Setting</span><span class="w"> </span><span class="na">xsi:type=</span><span class="s">&quot;xsd:string&quot;</span><span class="nt">&gt;</span>^<span class="nt">&lt;/Setting&gt;</span> <span class="w"> </span><span class="nt">&lt;/anyType&gt;</span> <span class="w"> </span><span class="nt">&lt;anyType</span><span class="w"> </span><span class="na">xsi:type=</span><span class="s">&quot;PrefsKeyPair&quot;</span><span class="nt">&gt;</span> <span class="w"> </span><span class="nt">&lt;Name&gt;</span>FindReplace<span class="nt">&lt;/Name&gt;</span> <span class="w"> </span><span class="nt">&lt;Setting</span><span class="w"> </span><span class="na">xsi:type=</span><span class="s">&quot;xsd:boolean&quot;</span><span class="nt">&gt;</span>false<span class="nt">&lt;/Setting&gt;</span> <span class="w"> </span><span class="nt">&lt;/anyType&gt;</span> <span class="w"> </span><span class="nt">&lt;anyType</span><span class="w"> </span><span class="na">xsi:type=</span><span class="s">&quot;PrefsKeyPair&quot;</span><span class="nt">&gt;</span> <span class="w"> </span><span class="nt">&lt;Name&gt;</span>EditSummary<span class="nt">&lt;/Name&gt;</span> <span class="w"> </span><span class="nt">&lt;Setting</span><span class="w"> </span><span class="na">xsi:type=</span><span class="s">&quot;xsd:string&quot;</span><span class="w"> </span><span class="nt">/&gt;</span> <span class="w"> </span><span class="nt">&lt;/anyType&gt;</span> <span class="w"> </span><span class="nt">&lt;/PluginSettings&gt;</span> <span class="w"> </span><span class="nt">&lt;/PluginPrefs&gt;</span> <span class="w"> </span><span class="nt">&lt;/Plugin&gt;</span> <span class="nt">&lt;/AutoWikiBrowserPreferences&gt;</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&amp;action=edit&amp;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">//---------------------------&lt; P R O C E S S A R T I C L E &gt;--------------------------------------------------</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">&quot;ERROR: &quot;</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">&quot;update to &quot;</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">&#39;:&#39;</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">&quot; data;&quot;</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">&quot;DEBUG: &quot;</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">&quot;Module:ISO 639 name/ISO 639-1&quot;</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">&quot;,\n\t&quot;</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 &quot;Module:Lang/data/iana languages&quot;:</span> <span class="c1">// replacement = String.Join(&quot;,\n\t&quot;, 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">&quot;Module:Lang/data/iana languages&quot;</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">&quot;,\n\t&quot;</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">&quot;,\n\t&quot;</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">&quot;-- &quot;</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">&quot;\nlocal active = {\n\t&quot;</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">&quot;\n\t}\n\nlocal deprecated = {\n\t&quot;</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">&quot;\n\t}\n\nreturn {\n\tactive = active,\n\tdeprecated = deprecated,\n\t}&quot;</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">&quot;Module:Lang/data/iana scripts&quot;</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">&quot;,\n\t&quot;</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">&quot;Module:Lang/data/iana regions&quot;</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">&quot;,\n\t&quot;</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">&quot;Module:Lang/data/iana suppressed scripts&quot;</span><span class="p">:</span> <span class="w"> </span><span class="n">List</span><span class="o">&lt;</span><span class="kt">string</span><span class="o">&gt;</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">&lt;</span><span class="kt">string</span><span class="o">&gt;</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">&lt;</span><span class="kt">string</span><span class="p">,</span><span class="w"> </span><span class="kt">string</span><span class="o">&gt;</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">&quot;[\&quot;&quot;</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">&quot;\&quot;] = &quot;</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">&#39;,&#39;</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">&quot;{&quot;</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">&quot;}&quot;</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">&quot;,\n\t&quot;</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">&quot;Module:Lang/data/iana variants&quot;</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">&quot;,\n\t&quot;</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">&quot;Unexpected article: &quot;</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">&quot;-- &quot;</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">&quot;\nreturn {\n\t&quot;</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">&quot;\n\t}&quot;</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">//---------------------------&lt; 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 &gt;------------------------</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">&gt;=</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">&quot;, &quot;</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">&lt;</span><span class="kt">string</span><span class="o">&gt;</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">&lt;</span><span class="kt">string</span><span class="o">&gt;</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">&gt;</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">&gt;</span><span class="w"> </span><span class="n">count</span><span class="p">)</span><span class="w"> </span><span class="o">&amp;&amp;</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">&gt;</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">&quot;, &quot;</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">&quot;,\n\t\t\t\t&quot;</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">//==========================&lt;&lt; S T A T I C I N I T I A L I Z A T I O N &gt;&gt;===================================</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 &#39;files&#39; and then use awb to simply assign</span> <span class="c1">// ArticleText = &lt;new text for ArticleTitle&gt;</span> <span class="c1">// and then return. The script&#39;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">//---------------------------&lt; S T A T I C D A T A &gt;--------------------------------------------------------</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">&quot;https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry&quot;</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">&quot;Z:\\Wikipedia\\language-subtag-registry_2020-07-17.txt&quot;</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">&lt;</span><span class="kt">string</span><span class="o">&gt;</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">&lt;</span><span class="kt">string</span><span class="o">&gt;</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">&lt;</span><span class="kt">string</span><span class="o">&gt;</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">&lt;</span><span class="kt">string</span><span class="o">&gt;</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">&lt;</span><span class="kt">string</span><span class="o">&gt;</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">&lt;</span><span class="kt">string</span><span class="o">&gt;</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">&lt;</span><span class="kt">string</span><span class="o">&gt;</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">&lt;</span><span class="kt">string</span><span class="o">&gt;</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">&lt;</span><span class="kt">string</span><span class="o">&gt;</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">&lt;</span><span class="kt">string</span><span class="o">&gt;</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">&lt;</span><span class="kt">string</span><span class="p">,</span><span class="w"> </span><span class="kt">string</span><span class="o">&gt;</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">&lt;</span><span class="kt">string</span><span class="p">,</span><span class="w"> </span><span class="kt">string</span><span class="o">&gt;</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">&lt;</span><span class="kt">string</span><span class="o">&gt;</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">&lt;</span><span class="kt">string</span><span class="o">&gt;</span><span class="p">();</span> <span class="c1">//---------------------------&lt; S T A T I C C O N S T R U C T O R &gt;------------------------------------------</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">@&quot;&quot;</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">&quot;IANA subtag registry file update (https://en.wikipedia.org/wiki/User:Trappist_the_monk/IANA_subtag_registry_file_update)&quot;</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 = &quot;file not found: &quot; + 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">&quot;Exception occurred reading: &quot;</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 = &quot;Exception occurred reading: &quot; + 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">&quot;%%&quot;</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">&#39;\n&#39;</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">&quot;Type: language&quot;</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">&quot;Type: script&quot;</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">&quot;Type: region&quot;</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">&quot;Type: variant&quot;</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">//---------------------------&lt; V A R I A N T _ P A R S E &gt;----------------------------------------------------</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">&lt;</span><span class="kt">string</span><span class="o">&gt;</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">&lt;</span><span class="kt">string</span><span class="o">&gt;</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">&#39;:&#39;</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">&quot; &quot;</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">&quot; &quot;</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">&quot;\&quot;&quot;</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">&quot;Subtag&quot;</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">&quot;Description&quot;</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">&quot;\&quot;&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;\\\&quot;&quot;</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">&quot;\&quot;&quot;</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">&quot;\&quot;&quot;</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">&quot;, \&quot;&quot;</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">&quot;\&quot;&quot;</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">&quot;Prefix&quot;</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">&quot;\&quot;&quot;</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">&quot;\&quot;&quot;</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">&quot;Deprecated&quot;</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">&quot;Comments&quot;</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">&quot;[\&quot;descriptions\&quot;] = {&quot;</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">&quot;},&quot;</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">&quot;[\&quot;prefixes\&quot;] = {&quot;</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">&quot;, &quot;</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">&quot;},&quot;</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">&quot;[\&quot;&quot;</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">&quot;\&quot;] = &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;{\n\t\t&quot;</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">&quot;\n\t\t&quot;</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">&quot;\n\t\t}&quot;</span><span class="p">);</span> <span class="w"> </span><span class="p">}</span> <span class="c1">//---------------------------&lt; R E G I O N _ P A R S E &gt;------------------------------------------------------</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">//---------------------------&lt; S C R I P T _ P A R S E &gt;------------------------------------------------------</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">//---------------------------&lt; L A N G _ P A R S E &gt;----------------------------------------------------------</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">//---------------------------&lt; L A N G _ S C R I P T _ R E G I O N _ P A R S E &gt;------------------------------</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">&quot;&quot;</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">&#39;:&#39;</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">&quot; &quot;</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">&quot; &quot;</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">&quot;\&quot;&quot;</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">&quot;Subtag&quot;</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">&quot;Description&quot;</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">&quot;Private use&quot;</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">&quot;\&quot;&quot;</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">&quot;\&quot;&quot;</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">&quot;, \&quot;&quot;</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">&quot;\&quot;&quot;</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">&quot;Suppress-Script&quot;</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&#39;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">&quot;Deprecated&quot;</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">&quot;Type: language&quot;</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">&quot;Comments&quot;</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">&quot;[\&quot;&quot;</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">&quot;\&quot;] = &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;{&quot;</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">&quot;}&quot;</span><span class="p">;</span> <span class="w"> </span><span class="p">}</span> <span class="c1">//---------------------------&lt; S U P P R E S S _ S C R I P T _ A D D &gt;----------------------------------------</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&#39;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">&quot;,\&quot;&quot;</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">&quot;\&quot;&quot;</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">&quot;\&quot;&quot;</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">&quot;\&quot;&quot;</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&amp;oldid=1234088430">https://en.wikipedia.org/w/index.php?title=User:Trappist_the_monk/IANA_subtag_registry_file_update&amp;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">&#160;(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&amp;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>

Pages: 1 2 3 4 5 6 7 8 9 10