CINXE.COM

Locale::Codes - a distribution of modules to handle locale codes - Perldoc Browser

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Locale::Codes - a distribution of modules to handle locale codes - Perldoc Browser</title> <link rel="search" href="/opensearch.xml" type="application/opensearchdescription+xml" title="Perldoc Browser"> <link rel="canonical" href="https://perldoc.perl.org/Locale::Codes"> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/stackoverflow-light.min.css" integrity="sha512-cG1IdFxqipi3gqLmksLtuk13C+hBa57a6zpWxMeoY3Q9O6ooFxq50DayCdm0QrDgZjMUn23z/0PMZlgft7Yp5Q==" crossorigin="anonymous" /> <style> body { background: #f4f4f5; color: #020202; } .navbar-dark { background-image: -webkit-linear-gradient(top, #005f85 0, #002e49 100%); background-image: -o-linear-gradient(top, #005f85 0, #002e49 100%); background-image: linear-gradient(to bottom, #005f85 0, #002e49 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff005f85', endColorstr='#ff002e49', GradientType=0); background-repeat: repeat-x; } .navbar-dark .navbar-nav .nav-link, .navbar-dark .navbar-nav .nav-link:focus { color: #fff } .navbar-dark .navbar-nav .nav-link:hover { color: #ffef68 } #wrapperlicious { margin: 0 auto; font: 0.9em 'Helvetica Neue', Helvetica, sans-serif; font-weight: normal; line-height: 1.5em; margin: 0; padding: 0; } #wrapperlicious h1 { font-size: 1.5em } #wrapperlicious h2 { font-size: 1.3em } #wrapperlicious h3 { font-size: 1.1em } #wrapperlicious h4 { font-size: 0.9em } #wrapperlicious h1, #wrapperlicious h2, #wrapperlicious h3, #wrapperlicious h4, #wrapperlicious dt { color: #020202; margin-top: 1em; margin-bottom: 1em; position: relative; font-weight: bold; } #wrapperlicious a { color: inherit; text-decoration: underline } #wrapperlicious #toc { text-decoration: none } #wrapperlicious a:hover { color: #2a2a2a } #wrapperlicious a img { border: 0 } #wrapperlicious :not(pre) > code { color: inherit; background-color: rgba(0, 0, 0, 0.04); border-radius: 3px; font: 0.9em Consolas, Menlo, Monaco, monospace; padding: 0.3em; } #wrapperlicious dd { margin: 0; margin-left: 2em; } #wrapperlicious dt { color: #2a2a2a; font-weight: bold; margin-left: 0.9em; } #wrapperlicious p { margin-bottom: 1em; margin-top: 1em; } #wrapperlicious li > p { margin-bottom: 0; margin-top: 0; } #wrapperlicious pre { border: 1px solid #c1c1c1; border-radius: 3px; font: 100% Consolas, Menlo, Monaco, monospace; margin-bottom: 1em; margin-top: 1em; } #wrapperlicious pre > code { display: block; background-color: #f6f6f6; font: 0.9em Consolas, Menlo, Monaco, monospace; line-height: 1.5em; text-align: left; white-space: pre; padding: 1em; } #wrapperlicious dl, #wrapperlicious ol, #wrapperlicious ul { margin-bottom: 1em; margin-top: 1em; } #wrapperlicious ul { list-style-type: square; } #wrapperlicious ul ul { margin-bottom: 0px; margin-top: 0px; } #footer { font-size: 0.8em; padding-top: 0.5em; text-align: center; } #more { display: inline; font-size: 0.8em; } #perldocdiv { background-color: #fff; border: 1px solid #c1c1c1; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; margin-left: auto; margin-right: auto; padding: 3em; padding-top: 1em; max-width: 960px; } #moduleversion { float: right } #wrapperlicious .leading-notice { font-style: italic; padding-left: 1em; margin-top: 1em; margin-bottom: 1em; } #wrapperlicious .permalink { display: none; left: -0.75em; position: absolute; padding-right: 0.25em; text-decoration: none; } #wrapperlicious h1:hover .permalink, #wrapperlicious h2:hover .permalink, #wrapperlicious h3:hover .permalink, #wrapperlicious h4:hover .permalink, #wrapperlicious dt:hover .permalink { display: block; } </style> <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-KVNWBNT5FB"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-KVNWBNT5FB'); gtag('config', 'UA-50555-3'); </script> </head> <body> <nav class="navbar navbar-expand-md navbar-dark bg-dark justify-content-between"> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <a class="navbar-brand" href="/"><img src="/images/perl_camel_30.png" width="30" height="30" class="d-inline-block align-top" alt="Perl Camel Logo"> Perldoc Browser</a> <div class="collapse navbar-collapse" id="navbarNav"> <ul class="navbar-nav mr-auto"> <li class="nav-item dropdown text-nowrap"> <a class="nav-link dropdown-toggle" href="#" id="dropdownlink-stable" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">5.18.0</a> <div class="dropdown-menu" aria-labelledby="dropdownlink-stable"> <a class="dropdown-item" href="/Locale::Codes">Latest</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.40.1/Locale::Codes">5.40.1</a> <a class="dropdown-item" href="/5.40.0/Locale::Codes">5.40.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.38.3/Locale::Codes">5.38.3</a> <a class="dropdown-item" href="/5.38.2/Locale::Codes">5.38.2</a> <a class="dropdown-item" href="/5.38.1/Locale::Codes">5.38.1</a> <a class="dropdown-item" href="/5.38.0/Locale::Codes">5.38.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.36.3/Locale::Codes">5.36.3</a> <a class="dropdown-item" href="/5.36.2/Locale::Codes">5.36.2</a> <a class="dropdown-item" href="/5.36.1/Locale::Codes">5.36.1</a> <a class="dropdown-item" href="/5.36.0/Locale::Codes">5.36.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.34.3/Locale::Codes">5.34.3</a> <a class="dropdown-item" href="/5.34.2/Locale::Codes">5.34.2</a> <a class="dropdown-item" href="/5.34.1/Locale::Codes">5.34.1</a> <a class="dropdown-item" href="/5.34.0/Locale::Codes">5.34.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.32.1/Locale::Codes">5.32.1</a> <a class="dropdown-item" href="/5.32.0/Locale::Codes">5.32.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.30.3/Locale::Codes">5.30.3</a> <a class="dropdown-item" href="/5.30.2/Locale::Codes">5.30.2</a> <a class="dropdown-item" href="/5.30.1/Locale::Codes">5.30.1</a> <a class="dropdown-item" href="/5.30.0/Locale::Codes">5.30.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.28.3/Locale::Codes">5.28.3</a> <a class="dropdown-item" href="/5.28.2/Locale::Codes">5.28.2</a> <a class="dropdown-item" href="/5.28.1/Locale::Codes">5.28.1</a> <a class="dropdown-item" href="/5.28.0/Locale::Codes">5.28.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.26.3/Locale::Codes">5.26.3</a> <a class="dropdown-item" href="/5.26.2/Locale::Codes">5.26.2</a> <a class="dropdown-item" href="/5.26.1/Locale::Codes">5.26.1</a> <a class="dropdown-item" href="/5.26.0/Locale::Codes">5.26.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.24.4/Locale::Codes">5.24.4</a> <a class="dropdown-item" href="/5.24.3/Locale::Codes">5.24.3</a> <a class="dropdown-item" href="/5.24.2/Locale::Codes">5.24.2</a> <a class="dropdown-item" href="/5.24.1/Locale::Codes">5.24.1</a> <a class="dropdown-item" href="/5.24.0/Locale::Codes">5.24.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.22.4/Locale::Codes">5.22.4</a> <a class="dropdown-item" href="/5.22.3/Locale::Codes">5.22.3</a> <a class="dropdown-item" href="/5.22.2/Locale::Codes">5.22.2</a> <a class="dropdown-item" href="/5.22.1/Locale::Codes">5.22.1</a> <a class="dropdown-item" href="/5.22.0/Locale::Codes">5.22.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.20.3/Locale::Codes">5.20.3</a> <a class="dropdown-item" href="/5.20.2/Locale::Codes">5.20.2</a> <a class="dropdown-item" href="/5.20.1/Locale::Codes">5.20.1</a> <a class="dropdown-item" href="/5.20.0/Locale::Codes">5.20.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.18.4/Locale::Codes">5.18.4</a> <a class="dropdown-item" href="/5.18.3/Locale::Codes">5.18.3</a> <a class="dropdown-item" href="/5.18.2/Locale::Codes">5.18.2</a> <a class="dropdown-item" href="/5.18.1/Locale::Codes">5.18.1</a> <a class="dropdown-item active" href="/5.18.0/Locale::Codes">5.18.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.16.3/Locale::Codes">5.16.3</a> <a class="dropdown-item" href="/5.16.2/Locale::Codes">5.16.2</a> <a class="dropdown-item" href="/5.16.1/Locale::Codes">5.16.1</a> <a class="dropdown-item" href="/5.16.0/Locale::Codes">5.16.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.14.4/Locale::Codes">5.14.4</a> <a class="dropdown-item" href="/5.14.3/Locale::Codes">5.14.3</a> <a class="dropdown-item" href="/5.14.2/Locale::Codes">5.14.2</a> <a class="dropdown-item" href="/5.14.1/Locale::Codes">5.14.1</a> <a class="dropdown-item" href="/5.14.0/Locale::Codes">5.14.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.12.5/Locale::Codes">5.12.5</a> <a class="dropdown-item" href="/5.12.4/Locale::Codes">5.12.4</a> <a class="dropdown-item" href="/5.12.3/Locale::Codes">5.12.3</a> <a class="dropdown-item" href="/5.12.2/Locale::Codes">5.12.2</a> <a class="dropdown-item" href="/5.12.1/Locale::Codes">5.12.1</a> <a class="dropdown-item" href="/5.12.0/Locale::Codes">5.12.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.10.1/Locale::Codes">5.10.1</a> <a class="dropdown-item" href="/5.10.0/Locale::Codes">5.10.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.8.9/Locale::Codes">5.8.9</a> <a class="dropdown-item" href="/5.8.8/Locale::Codes">5.8.8</a> <a class="dropdown-item" href="/5.8.7/Locale::Codes">5.8.7</a> <a class="dropdown-item" href="/5.8.6/Locale::Codes">5.8.6</a> <a class="dropdown-item" href="/5.8.5/Locale::Codes">5.8.5</a> <a class="dropdown-item" href="/5.8.4/Locale::Codes">5.8.4</a> <a class="dropdown-item" href="/5.8.3/Locale::Codes">5.8.3</a> <a class="dropdown-item" href="/5.8.2/Locale::Codes">5.8.2</a> <a class="dropdown-item" href="/5.8.1/Locale::Codes">5.8.1</a> <a class="dropdown-item" href="/5.8.0/Locale::Codes">5.8.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.6.2/Locale::Codes">5.6.2</a> <a class="dropdown-item" href="/5.6.1/Locale::Codes">5.6.1</a> <a class="dropdown-item" href="/5.6.0/Locale::Codes">5.6.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.005_04/Locale::Codes">5.005_04</a> <a class="dropdown-item" href="/5.005_03/Locale::Codes">5.005_03</a> <a class="dropdown-item" href="/5.005_02/Locale::Codes">5.005_02</a> <a class="dropdown-item" href="/5.005_01/Locale::Codes">5.005_01</a> <a class="dropdown-item" href="/5.005/Locale::Codes">5.005</a> </div> </li> <li class="nav-item dropdown text-nowrap"> <a class="nav-link dropdown-toggle" href="#" id="dropdownlink-dev" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dev</a> <div class="dropdown-menu" aria-labelledby="dropdownlink-dev"> <a class="dropdown-item" href="/blead/Locale::Codes">blead</a> <a class="dropdown-item" href="/5.41.10/Locale::Codes">5.41.10</a> <a class="dropdown-item" href="/5.41.9/Locale::Codes">5.41.9</a> <a class="dropdown-item" href="/5.41.8/Locale::Codes">5.41.8</a> <a class="dropdown-item" href="/5.41.7/Locale::Codes">5.41.7</a> <a class="dropdown-item" href="/5.41.6/Locale::Codes">5.41.6</a> <a class="dropdown-item" href="/5.41.5/Locale::Codes">5.41.5</a> <a class="dropdown-item" href="/5.41.4/Locale::Codes">5.41.4</a> <a class="dropdown-item" href="/5.41.3/Locale::Codes">5.41.3</a> <a class="dropdown-item" href="/5.41.2/Locale::Codes">5.41.2</a> <a class="dropdown-item" href="/5.41.1/Locale::Codes">5.41.1</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.40.1-RC1/Locale::Codes">5.40.1-RC1</a> <a class="dropdown-item" href="/5.40.0-RC2/Locale::Codes">5.40.0-RC2</a> <a class="dropdown-item" href="/5.40.0-RC1/Locale::Codes">5.40.0-RC1</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.39.10/Locale::Codes">5.39.10</a> <a class="dropdown-item" href="/5.39.9/Locale::Codes">5.39.9</a> <a class="dropdown-item" href="/5.39.8/Locale::Codes">5.39.8</a> <a class="dropdown-item" href="/5.39.7/Locale::Codes">5.39.7</a> <a class="dropdown-item" href="/5.39.6/Locale::Codes">5.39.6</a> <a class="dropdown-item" href="/5.39.5/Locale::Codes">5.39.5</a> <a class="dropdown-item" href="/5.39.4/Locale::Codes">5.39.4</a> <a class="dropdown-item" href="/5.39.3/Locale::Codes">5.39.3</a> <a class="dropdown-item" href="/5.39.2/Locale::Codes">5.39.2</a> <a class="dropdown-item" href="/5.39.1/Locale::Codes">5.39.1</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.38.3-RC1/Locale::Codes">5.38.3-RC1</a> </div> </li> <li class="nav-item dropdown text-nowrap"> <a class="nav-link dropdown-toggle" href="#" id="dropdownlink-nav" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Documentation</a> <div class="dropdown-menu" aria-labelledby="dropdownlink-nav"> <a class="dropdown-item" href="/5.18.0/perl">Perl</a> <a class="dropdown-item" href="/5.18.0/perlintro">Intro</a> <a class="dropdown-item" href="/5.18.0/perl#Tutorials">Tutorials</a> <a class="dropdown-item" href="/5.18.0/perlfaq">FAQs</a> <a class="dropdown-item" href="/5.18.0/perl#Reference-Manual">Reference</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.18.0/perlop">Operators</a> <a class="dropdown-item" href="/5.18.0/functions">Functions</a> <a class="dropdown-item" href="/5.18.0/variables">Variables</a> <a class="dropdown-item" href="/5.18.0/modules">Modules</a> <a class="dropdown-item" href="/5.18.0/perlutil">Utilities</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.18.0/perldelta">Release Notes</a> <a class="dropdown-item" href="/5.18.0/perlcommunity">Community</a> <a class="dropdown-item" href="/5.18.0/perlhist">History</a> </div> </li> </ul> <ul class="navbar-nav"> <script> function set_expand (expand) { var perldocdiv = document.getElementById('perldocdiv'); var width = window.getComputedStyle(perldocdiv).getPropertyValue('max-width'); var expanded = (width == '' || width == 'none') ? true : false; if (expand === null) { expand = !expanded; } if ((expand && !expanded) || (!expand && expanded)) { perldocdiv.style.setProperty('max-width', expand ? 'none' : '960px'); var button_classlist = document.getElementById('content-expand-button').classList; if (expand) { button_classlist.add('btn-light'); button_classlist.remove('btn-outline-light'); } else { button_classlist.add('btn-outline-light'); button_classlist.remove('btn-light'); } } return expand; } function toggle_expand () { var expand = set_expand(null); document.cookie = 'perldoc_expand=' + (expand ? 1 : 0) + '; path=/; expires=Tue, 19 Jan 2038 03:14:07 UTC'; } function read_expand () { return document.cookie.split(';').some(function (item) { return item.indexOf('perldoc_expand=1') >= 0 }); } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', function () { if (read_expand()) { set_expand(true); } }); } else if (read_expand()) { set_expand(true); } </script> <button id="content-expand-button" type="button" class="btn btn-outline-light d-none d-lg-inline-block mr-4" onclick="toggle_expand()">Expand</button> </ul> <form class="form-inline" method="get" action="/5.18.0/search"> <input class="form-control mr-3" type="search" name="q" placeholder="Search" aria-label="Search" value=""> </form> </div> </nav> <div id="wrapperlicious" class="container-fluid"> <div id="perldocdiv"> <div id="links"> <a href="/5.18.0/Locale::Codes">Locale::Codes</a> <div id="more"> (<a href="/5.18.0/Locale::Codes.txt">source</a>, <a href="https://metacpan.org/pod/Locale::Codes">CPAN</a>) </div> <div id="moduleversion">version 3.25</div> </div> <div class="leading-notice"> You are viewing the version of this documentation from Perl 5.18.0. <a href="/Locale::Codes">View the latest version</a> </div> <h1><a id="toc">CONTENTS</a></h1> <ul> <li> <a class="text-decoration-none" href="#NAME">NAME</a> </li> <li> <a class="text-decoration-none" href="#DESCRIPTION">DESCRIPTION</a> </li> <li> <a class="text-decoration-none" href="#NEW-CODE-SETS">NEW CODE SETS</a> </li> <li> <a class="text-decoration-none" href="#COMMON-ALIASES">COMMON ALIASES</a> </li> <li> <a class="text-decoration-none" href="#DEPRECATED-CODES">DEPRECATED CODES</a> </li> <li> <a class="text-decoration-none" href="#SEE-ALSO">SEE ALSO</a> </li> <li> <a class="text-decoration-none" href="#AUTHOR">AUTHOR</a> </li> <li> <a class="text-decoration-none" href="#COPYRIGHT">COPYRIGHT</a> </li> </ul> <h1 id="NAME"><a class="permalink" href="#NAME">#</a>NAME</h1> <p>Locale::Codes - a distribution of modules to handle locale codes</p> <h1 id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">#</a>DESCRIPTION</h1> <p><b>Locale-Codes</b> is a distribution containing a set of modules. The modules each deal with different types of codes which identify parts of the locale including languages, countries, currency, etc.</p> <p>Currently, the following modules are included:</p> <dl> <dt id="Locale::Codes::Country,-Locale::Country"><a class="permalink" href="#Locale::Codes::Country,-Locale::Country">#</a><a id="Locale"></a><a id="Locale::Codes::Country-Locale::Country"></a><b>Locale::Codes::Country, Locale::Country</b></dt> <dd> <p>This includes support for country codes (such as those listed in ISO-3166) to specify the country.</p> <p>Because this module was originally distributed as Locale::Country, it is also available under that name.</p> </dd> <dt id="Locale::Codes::Language,-Locale::Language"><a class="permalink" href="#Locale::Codes::Language,-Locale::Language">#</a><a id="Locale1"></a><a id="Locale::Codes::Language-Locale::Language"></a><b>Locale::Codes::Language, Locale::Language</b></dt> <dd> <p>This includes support for language codes (such as those listed in ISO-639) to specify the language.</p> <p>Because this module was originally distributed as Locale::Language, it is also available under that name.</p> </dd> <dt id="Locale::Codes::Currency,-Locale::Currency"><a class="permalink" href="#Locale::Codes::Currency,-Locale::Currency">#</a><a id="Locale2"></a><a id="Locale::Codes::Currency-Locale::Currency"></a><b>Locale::Codes::Currency, Locale::Currency</b></dt> <dd> <p>This includes support for currency codes (such as those listed in ISO-4217) to specify the currency.</p> <p>Because this module was originally distributed as Locale::Currency, it is also available under that name.</p> </dd> <dt id="Locale::Codes::Script,-Locale::Script"><a class="permalink" href="#Locale::Codes::Script,-Locale::Script">#</a><a id="Locale3"></a><a id="Locale::Codes::Script-Locale::Script"></a><b>Locale::Codes::Script, Locale::Script</b></dt> <dd> <p>This includes support for script codes (such as those listed in ISO-15924) to specify the script.</p> <p>Because this module was originally distributed as Locale::Script, it is also available under that name.</p> </dd> <dt id="Locale::Codes::LangExt"><a class="permalink" href="#Locale::Codes::LangExt">#</a><a id="Locale4"></a><b>Locale::Codes::LangExt</b></dt> <dd> <p>This includes support for language extension codes (such as those listed in the IANA language registry) to specify the language extension.</p> </dd> <dt id="Locale::Codes::LangVar"><a class="permalink" href="#Locale::Codes::LangVar">#</a><a id="Locale5"></a><b>Locale::Codes::LangVar</b></dt> <dd> <p>This includes support for language variation codes (such as those listed in the IANA language registry) to specify the language variation.</p> </dd> <dt id="Locale::Codes::LangFam"><a class="permalink" href="#Locale::Codes::LangFam">#</a><a id="Locale6"></a><b>Locale::Codes::LangFam</b></dt> <dd> <p>This includes support for language family codes (such as those listed in ISO 639-5) to specify families of languages.</p> </dd> </dl> <p>Each module can support an arbitrary number of code sets, and it it not required that the relationship between these code sets be one-to-one. For example, the Locale::Codes::Country module supports code sets from ISO-3166 and the FIPS 10 standard, and they do not break the world down into exactly the same sets of countries. This does not cause any problem (though converting codes from ISO-3166 to FIPS or back will not work except for countries that are one-to-one).</p> <p>All data in all of these modules comes directly from the original standards (or as close to direct as possible), so it should be up-to-date at the time of release.</p> <p>I plan on releasing a new version several times a year to incorporate any changes made in the standards. However, I don&#39;t always know about changes that occur, so if any of the standards change, and you want a new release sooner, just email me and I&#39;ll get one out.</p> <p>In addition to the modules above, there are a number of support modules included in the distribution including:</p> <dl> <dt id="Locale::Codes"><a class="permalink" href="#Locale::Codes">#</a><a id="Locale7"></a><b>Locale::Codes</b></dt> <dd> </dd> <dt id="Locale::Codes::Constants"><a class="permalink" href="#Locale::Codes::Constants">#</a><a id="Locale8"></a><b>Locale::Codes::Constants</b></dt> <dd> </dd> <dt id="Locale::Codes::Country_codes"><a class="permalink" href="#Locale::Codes::Country_codes">#</a><a id="Locale9"></a><b>Locale::Codes::Country_codes</b></dt> <dd> </dd> <dt id="Locale::Codes::Language_codes"><a class="permalink" href="#Locale::Codes::Language_codes">#</a><a id="Locale10"></a><b>Locale::Codes::Language_codes</b></dt> <dd> </dd> <dt id="Locale::Codes::Currency_codes"><a class="permalink" href="#Locale::Codes::Currency_codes">#</a><a id="Locale11"></a><b>Locale::Codes::Currency_codes</b></dt> <dd> </dd> <dt id="Locale::Codes::Script_codes"><a class="permalink" href="#Locale::Codes::Script_codes">#</a><a id="Locale12"></a><b>Locale::Codes::Script_codes</b></dt> <dd> </dd> <dt id="Locale::Codes::LangExt_codes"><a class="permalink" href="#Locale::Codes::LangExt_codes">#</a><a id="Locale13"></a><b>Locale::Codes::LangExt_codes</b></dt> <dd> </dd> <dt id="Locale::Codes::LangVar_codes"><a class="permalink" href="#Locale::Codes::LangVar_codes">#</a><a id="Locale14"></a><b>Locale::Codes::LangVar_codes</b></dt> <dd> </dd> <dt id="Locale::Codes::LangFam_codes"><a class="permalink" href="#Locale::Codes::LangFam_codes">#</a><a id="Locale15"></a><b>Locale::Codes::LangFam_codes</b></dt> <dd> </dd> </dl> <p>These modules are not intended to be used by programmers. They contain functions or data that are used by the modules listed above.</p> <h1 id="NEW-CODE-SETS"><a class="permalink" href="#NEW-CODE-SETS">#</a><a id="NEW"></a>NEW CODE SETS</h1> <p>I&#39;m always open to suggestions for new code sets.</p> <p>In order for me to add a code set, I want the following criteria to be met:</p> <dl> <dt id="General-use-code-set"><a class="permalink" href="#General-use-code-set">#</a><a id="General"></a><b>General-use code set</b></dt> <dd> <p>If a code set is not general use, I&#39;m not likely to spend the time to add and support it.</p> </dd> <dt id="An-official-source-of-data"><a class="permalink" href="#An-official-source-of-data">#</a><a id="An"></a><b>An official source of data</b></dt> <dd> <p>I require an official (or at least, a NEARLY official) source where I can get the data on a regular basis.</p> <p>Ideally, I&#39;d only get data from an official source, but sometimes that is not possible. For example the ISO standards are not typically available for free, so I may have to get some of that data from alternate sources that I&#39;m confident are getting their data from the official source. However, I will always be hesitant to accept a non-official source.</p> <p>As an example, I used to get some country data from the CIA World Factbook. Given the nature of the source, I&#39;m sure they&#39;re updating data from the official sources and I consider it &quot;nearly&quot; official. However, even in this case, I found that they were adding codes that were not part of the standard, so I have stopped using them as a source.</p> <p>There are many 3rd party sites which maintain lists (many of which are actually in a more convenient form than the official sites). Unfortunately, I will reject most of them since I have no feel for how &quot;official&quot; they are.</p> </dd> <dt id="A-free-source-of-the-data"><a class="permalink" href="#A-free-source-of-the-data">#</a><a id="A"></a><b>A free source of the data</b></dt> <dd> <p>Obviously, the data must be free-of-charge. I&#39;m not interested in paying for the data (and I&#39;m not interested in the overhead of having someone else pay for the data for me).</p> </dd> <dt id="A-reliable-source-of-data"><a class="permalink" href="#A-reliable-source-of-data">#</a><a id="A1"></a><b>A reliable source of data</b></dt> <dd> <p>The source of data must come from a source that I can reasonably expect to exist for the foreseeable future since I will be extremely reluctant to drop support for a data set once it&#39;s included.</p> <p>I am also reluctant to accept data sent to me by an individual. Although I appreciate the offer, it is simply not practical to consider an individual contribution as a reliable source of data. The source should be an official agency of some sort.</p> </dd> </dl> <p>These requirements are open to discussion. If you have a code set you&#39;d like to see added, but which may not meet all of the above requirements, feel free to email me and we&#39;ll discuss it. Depending on circumstances, I may be willing to waive some of these criteria.</p> <h1 id="COMMON-ALIASES"><a class="permalink" href="#COMMON-ALIASES">#</a><a id="COMMON"></a>COMMON ALIASES</h1> <p>As of version 2.00, the modules supported common variants of names.</p> <p>For example, Locale::Country supports variant names for countries, and a few of the most common ones are included in the data. The country code for &quot;United States&quot; is &quot;us&quot;, so:</p> <pre><code>country2code(&#39;United States&#39;); =&gt; &quot;us&quot;</code></pre> <p>Now the following will also return &#39;us&#39;:</p> <pre><code>country2code(&#39;United States of America&#39;); country2code(&#39;USA&#39;);</code></pre> <p>Any number of common aliases may be included in the data, in addition to the names that come directly from the standards. If you have a common alias for a country, language, or any other of the types of codes, let me know and I&#39;ll add it, with some restrictions.</p> <p>For example, the country name &quot;North Korea&quot; never appeared in any of the official sources (instead, it was &quot;Korea, North&quot; or &quot;Korea, Democratic People&#39;s Republic of&quot;. I would honor a request to add an alias &quot;North Korea&quot; since that&#39;s a very common way to specify the country (please don&#39;t request this... I&#39;ve already added it).</p> <p>On the other hand, a request to add Zaire as an alias for &quot;Congo, The Democratic Republic of&quot; will not be honored. The country&#39;s official name is no longer Zaire, so adding it as an alias violates the standard. Zaire was kept as an alias in versions prior to 3.00, but it has been removed. Other aliases (if any) which no longer appear in any standard (and which are not common variations of the name in the standards) have also been removed.</p> <h1 id="DEPRECATED-CODES"><a class="permalink" href="#DEPRECATED-CODES">#</a><a id="DEPRECATED"></a>DEPRECATED CODES</h1> <p>Occasionally, a code is deprecated, but it may still be desirable to have access to it.</p> <p>Although there is no way to see every code that has ever existed and been deprecated (since most codesets do not have that information available), as of version 3.20, every code which has ever been included in these modules can be referenced.</p> <p>For more information, refer to the documentation on the code2XXX, XXX2code, all_XXX_codes, and all_XXX_names function in the <b>Locale::Codes::API</b> documentation.</p> <h1 id="SEE-ALSO"><a class="permalink" href="#SEE-ALSO">#</a><a id="SEE"></a>SEE ALSO</h1> <dl> <dt id="Locale::Codes::API"><a class="permalink" href="#Locale::Codes::API">#</a><a id="Locale16"></a><b>Locale::Codes::API</b></dt> <dd> <p>The list of functions available in each of the modules listed below. The APIs for each module are exactly identical.</p> </dd> <dt id="Locale::Codes::Country"><a class="permalink" href="#Locale::Codes::Country">#</a><a id="Locale17"></a><b>Locale::Codes::Country</b></dt> <dd> <p>Codes for identification of countries.</p> </dd> <dt id="Locale::Codes::Language"><a class="permalink" href="#Locale::Codes::Language">#</a><a id="Locale18"></a><b>Locale::Codes::Language</b></dt> <dd> <p>Codes for identification of languages.</p> </dd> <dt id="Locale::Codes::Script"><a class="permalink" href="#Locale::Codes::Script">#</a><a id="Locale19"></a><b>Locale::Codes::Script</b></dt> <dd> <p>Codes for identification of scripts.</p> </dd> <dt id="Locale::Codes::Currency"><a class="permalink" href="#Locale::Codes::Currency">#</a><a id="Locale20"></a><b>Locale::Codes::Currency</b></dt> <dd> <p>Codes for identification of currencies and funds.</p> </dd> <dt id="Locale::Codes::LangExt1"><a class="permalink" href="#Locale::Codes::LangExt1">#</a><a id="Locale21"></a><b>Locale::Codes::LangExt</b></dt> <dd> <p>Codes for identification of language extensions.</p> </dd> <dt id="Locale::Codes::LangVar1"><a class="permalink" href="#Locale::Codes::LangVar1">#</a><a id="Locale22"></a><b>Locale::Codes::LangVar</b></dt> <dd> <p>Codes for identification of language variations.</p> </dd> <dt id="Locale::Codes::LangFam1"><a class="permalink" href="#Locale::Codes::LangFam1">#</a><a id="Locale23"></a><b>Locale::Codes::LangFam</b></dt> <dd> <p>Codes for identification of language families.</p> </dd> <dt id="Locale::Codes::Changes"><a class="permalink" href="#Locale::Codes::Changes">#</a><a id="Locale24"></a><b>Locale::Codes::Changes</b></dt> <dd> <p>A history of changes made to this distribution.</p> </dd> </dl> <h1 id="AUTHOR"><a class="permalink" href="#AUTHOR">#</a>AUTHOR</h1> <p>Locale::Country and Locale::Language were originally written by Neil Bowers at the Canon Research Centre Europe (CRE). They maintained the distribution from 1997 to 2001.</p> <p>Locale::Currency was originally written by Michael Hennecke and was modified by Neil Bowers for inclusion in the distribution.</p> <p>From 2001 to 2004, maintenance was continued by Neil Bowers. He modified Locale::Currency for inclusion in the distribution. He also added Locale::Constants and Locale::Script.</p> <p>From 2004-2009, the module was unmaintained.</p> <p>In 2010, maintenance was taken over by Sullivan Beck (sbeck@cpan.org) with Neil Bower&#39;s permission. All problems or comments should be sent there. Alternately, problems can be reported using the perl problem tracker at:</p> <pre><code class="plaintext">https://rt.cpan.org/Dist/Display.html?Queue=Locale-Codes</code></pre> <h1 id="COPYRIGHT"><a class="permalink" href="#COPYRIGHT">#</a>COPYRIGHT</h1> <pre><code class="plaintext">Copyright (c) 1997-2001 Canon Research Centre Europe (CRE). Copyright (c) 2001 Michael Hennecke (Locale::Currency) Copyright (c) 2001-2010 Neil Bowers Copyright (c) 2010-2013 Sullivan Beck</code></pre> <p>This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.</p> </div> <div id="footer"> <p>Perldoc Browser is maintained by Dan Book (<a href="https://metacpan.org/author/DBOOK">DBOOK</a>). Please contact him via the <a href="https://github.com/Grinnz/perldoc-browser/issues">GitHub issue tracker</a> or <a href="mailto:dbook@cpan.org">email</a> regarding any issues with the site itself, search, or rendering of documentation.</p> <p>The Perl documentation is maintained by the Perl 5 Porters in the development of Perl. Please contact them via the <a href="https://github.com/Perl/perl5/issues">Perl issue tracker</a>, the <a href="https://lists.perl.org/list/perl5-porters.html">mailing list</a>, or <a href="https://kiwiirc.com/client/irc.perl.org/p5p">IRC</a> to report any issues with the contents or format of the documentation.</p> </div> </div> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.slim.min.js" integrity="sha512-/DXTXr6nQodMUiq+IUJYCt2PPOUjrHJ9wFrqpJ3XkgPNOZVfMok7cRw6CSxyCQxXn6ozlESsSh1/sMCTF1rL/g==" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.1/umd/popper.min.js" integrity="sha512-ubuT8Z88WxezgSqf3RLuNi5lmjstiJcyezx34yIU2gAHonIi27Na7atqzUZCOoY4CExaoFumzOsFQ2Ch+I/HCw==" crossorigin="anonymous"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script> <script src="/js/highlight.pack.js"></script> <script>hljs.highlightAll();</script> </body> </html>

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