<p>I can't comment on the I18n data but I'm pretty familiar with CLDR and would generally expect it to give reasonable answers where it gives any answer at all.</p>
<p>To explain a little bit about language codes, there are a few variations depending on whether you're dealing with IANA BCP47 codes or CLDR ones and so on but broadly speaking a full language code looks something like:</p>
<pre><code>language-Script-REGION-VARIANT
</code></pre>
<p>Where language is a two or three letter language code, normally in lowercase; script is a four letter script code, normally in mixed case; region is a two letter country code, normally in upper case; and variant is one of more variant tags each of 5 to 8 characters and normally in mixed case.</p>
<p>Either hyphen or underscore is used as the separator and any component after the first can be left out in which case CLDR has a table that tells you what value to assume (the "likely subtag" table).</p>
<p>So the full name of British English would be <code>en-Latn-GB</code> but as latin is the only script ever used that is normally left out.</p>
<p>It gets fun with Chinese where <code>zh-Hans</code> is simplified Chinese (with no specific region) and <code>zh-Hant</code> is traditional Chinese (with no specific reason) but there is a long history of actually using <code>zh-CN</code> and <code>zh-TW</code> for those as we do.</p>
<p>The likely expansion for <code>be</code> in CLDR is <code>be-Cyrl-BY</code> which is the Belarussian written in Cyrillic as used in Belarus. The <code>Tarask</code> is actually a variant tag that selects an alternate orthography.</p>
<p>We have code in <code>lib/locale.rb</code> that attempts to select the best match for a given language code against a set of available codes - that was written by me after I gave up attempting to get the HTTP accept language parsing gem improved. It's not as good as it could be with access to the CLDR data tables...</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/issues/2298?email_source=notifications&email_token=AAK2OLKWTELDN6AZI5CL4BTP5SILDA5CNFSM4H5EOGA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZEHBCA#issuecomment-508063880">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLOWTFFVXZI6GEJAVDTP5SILDANCNFSM4H5EOGAQ">mute the thread</a>.<img src="https://github.com/notifications/beacon/AAK2OLMNQJE2KJUR24V2L7LP5SILDA5CNFSM4H5EOGA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZEHBCA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/issues/2298?email_source=notifications\u0026email_token=AAK2OLKWTELDN6AZI5CL4BTP5SILDA5CNFSM4H5EOGA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZEHBCA#issuecomment-508063880",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/2298?email_source=notifications\u0026email_token=AAK2OLKWTELDN6AZI5CL4BTP5SILDA5CNFSM4H5EOGA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZEHBCA#issuecomment-508063880",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>