<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://debianws.lexgopc.com/wiki143/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=70.113.149.47</id>
	<title>wiki143 - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://debianws.lexgopc.com/wiki143/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=70.113.149.47"/>
	<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=Special:Contributions/70.113.149.47"/>
	<updated>2026-10-24T11:34:54Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>http://debianws.lexgopc.com/wiki143/index.php?title=Locale_(computer_software)&amp;diff=4765461</id>
		<title>Locale (computer software)</title>
		<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=Locale_(computer_software)&amp;diff=4765461"/>
		<updated>2025-10-13T20:05:55Z</updated>

		<summary type="html">&lt;p&gt;70.113.149.47: /* Specifics for Microsoft platforms */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Short description|Parameters defining locale in computer}}&lt;br /&gt;
{{other uses|Locale (disambiguation)}}&lt;br /&gt;
&lt;br /&gt;
In [[computing]], a &#039;&#039;&#039;locale&#039;&#039;&#039; is a set of [[parameter]]s that defines the user&#039;s language, region and any special variant preferences that the user wants to see in their [[user interface]]. Usually a locale identifier consists of at least a language code and a country/region code.&lt;br /&gt;
Locale is an important aspect of [[i18n]].&lt;br /&gt;
== General locale settings ==&lt;br /&gt;
&lt;br /&gt;
These settings usually include the following display (output) format settings:&lt;br /&gt;
&lt;br /&gt;
* Number format setting (LC_NUMERIC, C/C++)&lt;br /&gt;
* Character classification, case conversion settings (LC_CTYPE, C/C++)&lt;br /&gt;
* Date-time format setting (LC_TIME, C/C++)&lt;br /&gt;
* String [[collation]] setting (LC_COLLATE, C/C++)&lt;br /&gt;
* Currency format setting (LC_MONETARY, C/C++)&lt;br /&gt;
* Paper size setting (LC_PAPER, ISO 30112)&lt;br /&gt;
* Color temperature setting&lt;br /&gt;
* UI font setting (especially for [[CJKV]] language)&lt;br /&gt;
* Location setting (country or region)&lt;br /&gt;
* [[Windows code pages|ANSI character set]] setting (for [[Microsoft Windows]])&lt;br /&gt;
&lt;br /&gt;
The locale settings are about formatting output given a locale. So, the time zone information and daylight saving time are not usually part of the locale settings.&lt;br /&gt;
Less usual is the input format setting, which is mostly defined on a per application basis.&lt;br /&gt;
&lt;br /&gt;
== Programming and markup language support ==&lt;br /&gt;
In these environments,&lt;br /&gt;
&lt;br /&gt;
{{div col|colwidth=18em}}&lt;br /&gt;
* [[C (programming language)|C]]&lt;br /&gt;
* [[C++]]&lt;br /&gt;
* [[Eiffel (programming language)|Eiffel]]&lt;br /&gt;
* [[Java (programming language)|Java]]&lt;br /&gt;
* [[.NET Framework]]&lt;br /&gt;
* [[REBOL]]&lt;br /&gt;
* [[Ruby (programming language)|Ruby]]&lt;br /&gt;
* [[Perl]]&lt;br /&gt;
* [[PHP]]&lt;br /&gt;
* [[Python (programming language)|Python]]&lt;br /&gt;
* [[XML]]&lt;br /&gt;
* [[JavaServer Pages|JSP]]&lt;br /&gt;
* [[JavaScript]]&lt;br /&gt;
&lt;br /&gt;
{{div col end}}&lt;br /&gt;
&lt;br /&gt;
and other (nowadays) [[Unicode]]-based environments, they are defined in a format similar to [[BCP 47]]. They are usually defined with just [[ISO 639]] (language) and [[ISO 3166-1 alpha-2]] (2-letter country) codes.&lt;br /&gt;
&lt;br /&gt;
== International standards ==&lt;br /&gt;
&lt;br /&gt;
In standard C and C++, locale is defined in &amp;quot;categories&amp;quot; of {{tt|LC_COLLATE}} (text collation), {{tt|LC_CTYPE}} (character class), {{tt|LC_MONETARY}} (currency format), {{tt|LC_NUMERIC}} (number format), and {{tt|LC_TIME}} (time format). The special {{tt|LC_ALL}} category can be used to set all locale settings.&amp;lt;ref&amp;gt;{{cite web |title=LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC, LC_TIME - cppreference.com |url=https://en.cppreference.com/w/c/locale/LC_categories |website=en.cppreference.com}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is no standard locale names associated with C and C++ standards besides a &amp;quot;minimal locale&amp;quot; name &amp;quot;C&amp;quot;, although the POSIX format is a commonly used baseline.&lt;br /&gt;
&lt;br /&gt;
=== POSIX platforms ===&lt;br /&gt;
&lt;br /&gt;
On [[POSIX]] platforms such as [[Unix]], [[Linux]] and others, locale identifiers are defined in a way similar to the [[BCP 47]] definition of language tags, but the locale variant modifier is defined differently, and the [[character set]] is optionally included as a part of the identifier. The POSIX or &amp;quot;XPG&amp;quot; format is {{mono|&amp;lt;nowiki&amp;gt;[language[_territory][.codeset][@modifier]]&amp;lt;/nowiki&amp;gt;}}. (For example, [[Australian English]] using the [[UTF-8]] encoding is {{mono|en_AU.UTF-8}}.)&amp;lt;ref&amp;gt;{{cite web |title=Environment Variables |url=https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html |website=pubs.opengroup.org}}&amp;lt;/ref&amp;gt; Separately, [[ISO/IEC 15897]] describes a different form, {{mono|&amp;lt;nowiki&amp;gt;language_territory+audience+application,sponsor_version&amp;lt;/nowiki&amp;gt;}}, though it&#039;s highly dubious whether it is used at all.&amp;lt;ref&amp;gt;{{cite web |title=ISO/IEC JTC1/SC22 N610 [draft ISO/IEC 15897:1998(E)] Information technology — Procedures for registration of cultural elements |url=https://www.open-std.org/jtc1/sc22/wg20/docs/n610.pdf |access-date=8 June 2023 |date=1998-11-17|quote=For Narrative Cultural Specifications and POSIX Locales the token identifier will be: 8_9+11+12,13_14}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;!-- The identifier format is documented with the environment variables, but how do we cite (e.g.) SUSv4 here? Also, this seems to be part of an &amp;quot;optional&amp;quot; feature. ~~~~ --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the next example there is an output of command &amp;lt;code&amp;gt;locale&amp;lt;/code&amp;gt; for [[Czech language]] (cs), [[Czech Republic]] (CZ) with explicit [[UTF-8]] encoding:&lt;br /&gt;
&lt;br /&gt;
 $ &#039;&#039;&#039;locale&#039;&#039;&#039;&lt;br /&gt;
 LANG=cs_CZ.UTF-8&lt;br /&gt;
 LC_CTYPE=&amp;quot;cs_CZ.UTF-8&amp;quot;&lt;br /&gt;
 LC_NUMERIC=&amp;quot;cs_CZ.UTF-8&amp;quot;&lt;br /&gt;
 LC_TIME=&amp;quot;cs_CZ.UTF-8&amp;quot;&lt;br /&gt;
 LC_COLLATE=&amp;quot;cs_CZ.UTF-8&amp;quot;&lt;br /&gt;
 LC_MONETARY=&amp;quot;cs_CZ.UTF-8&amp;quot;&lt;br /&gt;
 LC_MESSAGES=&amp;quot;cs_CZ.UTF-8&amp;quot;&lt;br /&gt;
 LC_PAPER=&amp;quot;cs_CZ.UTF-8&amp;quot;&lt;br /&gt;
 LC_NAME=&amp;quot;cs_CZ.UTF-8&amp;quot;&lt;br /&gt;
 LC_ADDRESS=&amp;quot;cs_CZ.UTF-8&amp;quot;&lt;br /&gt;
 LC_TELEPHONE=&amp;quot;cs_CZ.UTF-8&amp;quot;&lt;br /&gt;
 LC_MEASUREMENT=&amp;quot;cs_CZ.UTF-8&amp;quot;&lt;br /&gt;
 LC_IDENTIFICATION=&amp;quot;cs_CZ.UTF-8&amp;quot;&lt;br /&gt;
 LC_ALL=&lt;br /&gt;
&lt;br /&gt;
== Specifics for Microsoft platforms ==&lt;br /&gt;
&lt;br /&gt;
{{outdated|section|date=October 2025}}&lt;br /&gt;
&lt;br /&gt;
Windows uses specific [https://web.archive.org/web/20170228045725/https://msdn.microsoft.com/en-us/library/39cwe7zf(vs.71).aspx language] and [https://web.archive.org/web/20160610104759/https://msdn.microsoft.com/en-us/library/cdax410z(VS.71).aspx territory] strings.&lt;br /&gt;
The &#039;&#039;locale identifier&#039;&#039; (LCID) for [[managed code|unmanaged code]] on [[Microsoft Windows]] is a number such as 1033 for English (United States), or 2057 for English (United Kingdom), or 1041 for Japanese (Japan). These numbers consist of a language code (lower 10 bits) and a culture code (upper bits), and are therefore often written in [[hexadecimal]] notation, such as 0x0409, 0x0809 or 0x0411.&lt;br /&gt;
[[Microsoft]] is starting to introduce managed code [[application programming interface]]s (APIs) for .NET that use this format. One of the first to be generally released is a function to mitigate issues with [[internationalized domain name]]s,&amp;lt;ref&amp;gt;{{cite web |url=https://msdn.microsoft.com/library/windows/desktop/dd317795.aspx |title=DownlevelGetLocaleScripts function (Windows) |work=[[Microsoft Developer Network|MSDN]] |publisher=[[Microsoft]] |accessdate=2017-12-11}}&amp;lt;/ref&amp;gt; but more are in [[Windows Vista]] Beta 1.&lt;br /&gt;
&lt;br /&gt;
Starting with Windows Vista, new functions&amp;lt;ref name=&amp;quot;microsoft&amp;quot;&amp;gt;{{cite web |url=https://docs.microsoft.com/en-us/windows/win32/intl/locale-names |title=Locale Names (Windows) |work=[[Microsoft Developer Network|MSDN]] |publisher=[[Microsoft]] |accessdate=2017-12-11}}&amp;lt;/ref&amp;gt; that use [[BCP 47]] locale names have been introduced to replace nearly all LCID-based APIs.&lt;br /&gt;
&lt;br /&gt;
A POSIX-like locale name format of {{mono|language[_country-region[.code-page]]}} is available in the UCRT (Universal C Run Time) of Windows 10 and 11.&amp;lt;ref&amp;gt;{{cite web |title=Locale Names, Languages, and Country-Region Strings |url=https://learn.microsoft.com/en-us/cpp/c-runtime-library/locale-names-languages-and-country-region-strings?view=msvc-140 |website=learn.microsoft.com |language=en-us |date=19 October 2022}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Internationalization and localization]]&lt;br /&gt;
* [[ISO 639]] [[language code]]s&lt;br /&gt;
* [[ISO 3166-1 alpha-2]] [[region code]]s&lt;br /&gt;
* [[ISO 15924]] [[script code]]s&lt;br /&gt;
* [[IETF language tag]]&lt;br /&gt;
* [[C localization functions]]&lt;br /&gt;
* [[CCSID]]&lt;br /&gt;
* [[Code page]]&lt;br /&gt;
* [[Common Locale Data Repository]]&lt;br /&gt;
* [[Date and time representation by country]]&lt;br /&gt;
* AppLocale&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
{{Reflist}}&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
{{linkfarm|date=September 2019}}&lt;br /&gt;
{{wiktionary|locale}}&lt;br /&gt;
* [https://tools.ietf.org/html/bcp47 BCP 47]&lt;br /&gt;
* [https://www.iana.org/assignments/language-subtag-registry Language Subtag Registry]&lt;br /&gt;
* [https://www.unicode.org/cldr/ Common Locale Data Repository]&lt;br /&gt;
* {{Javadoc:SE|package=java.util|java/util|Locale}} [[Javadoc]] API documentation&lt;br /&gt;
* [https://msdn.microsoft.com/en-us/library/dd318716 Locale and Language information from Microsoft]&lt;br /&gt;
* [https://msdn.microsoft.com/en-us/library/cc233965.aspx MS-LCID: Windows Language Code Identifier (LCID) Reference from Microsoft]&lt;br /&gt;
* [https://msdn.microsoft.com/en-us/library/cc233968.aspx Microsoft LCID list]&lt;br /&gt;
* [https://msdn.microsoft.com/en-us/library/0h88fahh.aspx Microsoft LCID chart with decimal equivalents]&lt;br /&gt;
* [https://www.opengroup.org/onlinepubs/007908799/xbd/envvar.html POSIX Environment Variables]&lt;br /&gt;
* [https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html Low Level Technical details on defining a POSIX locale]&lt;br /&gt;
* [http://demo.icu-project.org/icu-bin/locexp ICU Locale Explorer]&lt;br /&gt;
* [https://wiki.debian.org/Locale Debian Wiki on Locales]&lt;br /&gt;
* Article &amp;quot;[https://cantrip.org/locale.html The Standard C++ Locale]&amp;quot; by [[Nathan C. Myers]]&lt;br /&gt;
* [http://www.die.net/doc/linux/man/man7/locale.7.html locale(7): Description of multi-language support] - Linux man page&lt;br /&gt;
* [http://incubator.apache.org/stdcxx/doc/stdlibug/VII.html Apache C++ Standard Library Locale User&#039;s Guide]&lt;br /&gt;
* [https://web.archive.org/web/20110520132147/http://www.collation-charts.org/ Sort order charts for various operating system locales and database collations]&lt;br /&gt;
* [http://www.freesource.info/wiki/Lokalizacija/NATSPECDescription NATSPEC Library]&lt;br /&gt;
* [https://www.debian.org/doc/manuals/reference/ch-tune.en.html#s-env-locale Description of locale-related UNIX environment variables in Debian Linux Reference Manual]&lt;br /&gt;
* [https://docs.translatehouse.org/projects/localization-guide/en/latest/guide/start.html?id=guide/start#locales Guides to locales and locale creation on various platforms]&lt;br /&gt;
&lt;br /&gt;
[[Category:Unix user management and support-related utilities]]&lt;br /&gt;
[[Category:Unix SUS2008 utilities]]&lt;br /&gt;
[[Category:Internationalization and localization]]&lt;/div&gt;</summary>
		<author><name>70.113.149.47</name></author>
	</entry>
</feed>