locale (computer software)
   HOME

TheInfoList



In
computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithm of an algorithm (Euclid's algorithm) for calculating the greatest common divisor (g.c.d ...

computing
, a locale is a set of
parameter A parameter (), generally, is any characteristic that can help in defining or classifying a particular system A system is a group of Interaction, interacting or interrelated elements that act according to a set of rules to form a unified whol ...

parameter
s that defines the user's language, region and any special variant preferences that the user wants to see in their
user interface 300px, The Reactable, an example of a tangible user interface In the industrial design field of human–computer interaction, a user interface (UI) is the space where interactions between humans and machines occur. The goal of this interaction ...
. Usually a locale identifier consists of at least a language code and a country/region code. On
POSIX The Portable Operating System Interface (POSIX) is a family of standard Standard may refer to: Flags * Colours, standards and guidons * Standard (flag), a type of flag used for personal identification Norm, convention or requirement * Sta ...
platforms such as
Unix Unix (; trademarked as UNIX) is a family of multitasking, multiuser Multi-user software is computer software Software is a collection of Instruction (computer science), instructions and data (computing), data that tell a computer how to ...

Unix
,
Linux Linux ( or ) is a family of open-source Unix-like A Unix-like (sometimes referred to as UN*X or *nix) operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to a ...

Linux
and others, locale identifiers are defined by ISO/IEC 15897, which is similar to the
BCP 47 An IETF BCP 47 language tag is a code to identify Language, human languages. Notably, the tag ''en'' stands for English language, English; ''es-419'' for Spanish language in the Americas , Latin American Spanish; ''rm-sursilv'' for Sursilvan; ''g ...
definition of language tags, but the locale variant modifier is defined differently, and the
character set Character encoding is the process of assigning numbers to Graphics, graphical character (computing), characters, especially the written characters of Language, human language, allowing them to be Data storage, stored, Data communication, transmit ...
is included as a part of the identifier. It is defined in this format: . (For example,
Australian English Australian English (AusE,AusEng, AuE, AuEng, en-AU) is the set of variety (linguistics), varieties of the English language native to Australia. Australian English is the country's national and ''de facto'' common language. English is the Lang ...
using the
UTF-8 UTF-8 is a variable-width character encoding In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes and development ...
encoding is .)


General locale settings

These settings usually include the following display (output) format settings: * Number format setting * Character classification, case conversion settings * Date-time format setting * String
collation Collation is the assembly of written information into a standard order. Many systems of collation are based on numerical order or alphabetical order, or extensions and combinations thereof. Collation is a fundamental element of most office fili ...
setting * Currency format setting * Paper size setting *Color setting 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. Less usual is the input format setting, which is mostly defined on a per application basis.


Programming and markup language support

In these environments, * C *
C++ C++ () is a general-purpose programming language In computer software, a general-purpose programming language is a programming language dedicated to a general-purpose, designed to be used for writing software in a wide variety of application ...

C++
* Eiffel *
Java Java ( id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands The Greater Sunda Islands are four tropical islands situated within Southeast Asia, in the Pacific Ocean. The islands, Borneo, Java, Sulawesi and Sumatra, are internat ...
* .NET Framework *
REBOL Rebol ( ; historically REBOL) is a cross-platform data exchange language and a multi-paradigm programming language, multi-paradigm dynamic programming language designed by Carl Sassenrath for network communications and distributed computing. It ...
*
Ruby A ruby is a pink to blood-red coloured gemstone A gemstone (also called a gem, fine gem, jewel, precious stone, or semi-precious stone) is a piece of mineral crystal which, in cut and polished form, is used to make jewellery, jewelry or othe ...
*
Perl Perl is a family of two high-level High-level and low-level, as technical terms, are used to classify, describe and point to specific Objective (goal), goals of a systematic operation; and are applied in a wide range of contexts, such as, for ...
*
PHP PHP is a general-purpose scripting language geared towards web development Web development is the work involved in developing a Web site, website for the Internet (World Wide Web) or an intranet (a private network). Web development can range ...

PHP
*
Python PYTHON was a Cold War contingency plan of the Government of the United Kingdom, British Government for the continuity of government in the event of Nuclear warfare, nuclear war. Background Following the report of the Strath Committee in 1955, the ...
*
XML Extensible Markup Language (XML) is a markup language #REDIRECT Markup language In computer text processing, a markup language is a system for annotation, annotating a document in a way that is Syntax (logic), syntactically distinguishable fro ...

XML
*
JSP JSP may refer to: Computing *Jackson structured programming *JavaServer Pages, server-side Java *Java stored procedure (SQL/JRT) Organisations *The Japanese School in Perth *Jewish Settlement Police, an organization established in Mandatory Palest ...
*
JavaScript JavaScript (), often abbreviated JS, is a programming language A programming language is a formal language comprising a Instruction set architecture, set of instructions that produce various kinds of Input/output, output. Programming lang ...

JavaScript
and other (nowadays)
Unicode Unicode, formally the Unicode Standard, is an information technology standard Standard may refer to: Flags * Colours, standards and guidons * Standard (flag), a type of flag used for personal identification Norm, convention or requireme ...

Unicode
-based environments, they are defined in a format similar to
BCP 47 An IETF BCP 47 language tag is a code to identify Language, human languages. Notably, the tag ''en'' stands for English language, English; ''es-419'' for Spanish language in the Americas , Latin American Spanish; ''rm-sursilv'' for Sursilvan; ''g ...
. They are usually defined with just
ISO 639 ISO 639 is a set of standards by the International Organization for Standardization The International Organization for Standardization (ISO ) is an international standard An international standard is a technical standard A technical standa ...
(language) and
ISO 3166-1 alpha-2 ISO 3166-1 alpha-2 codes are two-letter country codes defined in ISO 3166-1, part of the ISO 3166 standardization, standard published by the International Organization for Standardization (ISO), to represent country, countries, dependent territory ...
(2-letter country) codes.


POSIX platforms

On
POSIX The Portable Operating System Interface (POSIX) is a family of standard Standard may refer to: Flags * Colours, standards and guidons * Standard (flag), a type of flag used for personal identification Norm, convention or requirement * Sta ...
platforms, locale identifiers are defined by ISO/IEC 15897, which is similar to the
BCP 47 An IETF BCP 47 language tag is a code to identify Language, human languages. Notably, the tag ''en'' stands for English language, English; ''es-419'' for Spanish language in the Americas , Latin American Spanish; ''rm-sursilv'' for Sursilvan; ''g ...
definition of language tags, but the locale variant modifier is defined differently, and the
character set Character encoding is the process of assigning numbers to Graphics, graphical character (computing), characters, especially the written characters of Language, human language, allowing them to be Data storage, stored, Data communication, transmit ...
is included as a part of the identifier. In the next example there is an output of command locale for
Czech language Czech (; Czech ), historically also Bohemian (; ''lingua Bohemica'' in Latin Latin (, or , ) is a classical language belonging to the Italic branch of the Indo-European languages. Latin was originally spoken in the area around Rome, kno ...
(cs),
Czech Republic The Czech Republic, also known by its short-form name Czechia and formerly known as Bohemia, is a landlocked country in Central Europe. It is bordered by Austria to the south, Germany to the west, Poland to the northeast, and Slovakia to ...
(CZ) with explicit
UTF-8 UTF-8 is a variable-width character encoding In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes and development ...
encoding: $ locale LANG=cs_CZ.UTF-8 LC_CTYPE="cs_CZ.UTF-8" LC_NUMERIC="cs_CZ.UTF-8" LC_TIME="cs_CZ.UTF-8" LC_COLLATE="cs_CZ.UTF-8" LC_MONETARY="cs_CZ.UTF-8" LC_MESSAGES="cs_CZ.UTF-8" LC_PAPER="cs_CZ.UTF-8" LC_NAME="cs_CZ.UTF-8" LC_ADDRESS="cs_CZ.UTF-8" LC_TELEPHONE="cs_CZ.UTF-8" LC_MEASUREMENT="cs_CZ.UTF-8" LC_IDENTIFICATION="cs_CZ.UTF-8" LC_ALL=


Specifics for Microsoft platforms

Windows uses specifi
language
an
territory
strings. The ''locale identifier'' (LCID) for unmanaged code on
Microsoft Windows Microsoft Windows, commonly referred to as Windows, is a group of several families, all of which are developed and marketed by . Each family caters to a certain sector of the computing industry. Active Microsoft Windows families include an ...
is a number such as 1033 for English (United States) or 1041 for Japanese (Japan). These numbers consist of a language code (lower 10 bits) and culture code (upper bits) and are therefore often written in
hexadecimal In mathematics and computing, the hexadecimal (also base 16 or hex) numeral system is a Numeral system#Positional systems in detail, positional numeral system that represents numbers using a radix (base) of 16. Unlike the decimal system represe ...
notation, such as 0x0409 or 0x0411. The list of those codesets are described in
character encoding Character encoding is the process of assigning numbers to Graphics, graphical character (computing), characters, especially the written characters of Language, human language, allowing them to be Data storage, stored, Data communication, transmi ...
.
Microsoft Microsoft Corporation is an American multinational Multinational may refer to: * Multinational corporation, a corporate organization operating in multiple countries * Multinational force, a military body from multiple countries * Multinationa ...

Microsoft
is starting to introduce managed code
application programming interface In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes and development of both computer hardware , hardware and soft ...
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 nameImage:IDN-utopia-greek.jpg, thumbnail, Example of Greek IDN with domain name in non-Latin alphabet: ουτοπία.δπθ.gr An internationalized domain name (IDN) is an Internet domain name that contains at least one label that is displayed in Appli ...
s, but more are in
Windows Vista Windows Vista is a major release of the Windows NT operating system developed by Microsoft. It was the direct successor to Windows XP, which was released five years prior, at the time being the longest time span between successive releases of M ...
Beta 1. Starting with Windows Vista, new functions that use
BCP 47 An IETF BCP 47 language tag is a code to identify Language, human languages. Notably, the tag ''en'' stands for English language, English; ''es-419'' for Spanish language in the Americas , Latin American Spanish; ''rm-sursilv'' for Sursilvan; ''g ...
locale names have been introduced to replace nearly all LCID-based APIs.


See also

*
Internationalization and localization In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes and development of both computer hardware , hardware and softwa ...
*
ISO 639 ISO 639 is a set of standards by the International Organization for Standardization The International Organization for Standardization (ISO ) is an international standard An international standard is a technical standard A technical standa ...
language code A language is a structured system of communication used by humans, including speech (spoken language A spoken language is a language A language is a structured system of communication used by humans, including speech (spoken language), g ...
s *
ISO 3166-1 alpha-2 ISO 3166-1 alpha-2 codes are two-letter country codes defined in ISO 3166-1, part of the ISO 3166 standardization, standard published by the International Organization for Standardization (ISO), to represent country, countries, dependent territory ...
region codes *
ISO 15924 International Organization for Standardization, ISO 15924, Codes for the representation of names of scripts, defines two sets of codes for a number of writing systems (scripts). Each script is given both a four-letter code and a numeric one. A scrip ...
script code
script code
s *
IETF language tag An IETF BCP 47 language tag is a standardized code or tag that is used to identify human languages in internet programming as used by computing standards such as HTTP The Hypertext Transfer Protocol (HTTP) is an application layer An applica ...
*
C localization functions In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes and development of both computer hardware , hardware and softwa ...
*
CCSID A CCSID (coded character set identifier) is a 16-bit number that represents a particular encoding In communication Communication (from Latin ''communicare'', meaning "to share") is the act of developing Semantics, meaning among Subject (phil ...
*
Code page In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithm of an algorithm (Euclid's algorithm) for calculating the greatest common ...
*
Common Locale Data Repository The Common Locale Data Repository Project, often abbreviated as CLDR, is a project of the Unicode Consortium The Unicode Consortium (legally Unicode, Inc.) is a 501(c)(3) A 501(c)(3) organization is a corporation, trust, unincorporated associatio ...
*
Date and time representation by country Different conventions exist around the world for date and time representation, both written and spoken. Differences Differences can exist in: *The calendar that is used. *The order in which the year A year is the orbital period of a pla ...
* AppLocale


References


External links


BCP 47

Language Subtag Registry

Common Locale Data Repository
* {{Javadoc:SE, package=java.util, java/util, Locale Javadoc API documentation
Locale and Language information from Microsoft

MS-LCID: Windows Language Code Identifier (LCID) Reference from Microsoft

Microsoft LCID list

Microsoft LCID chart with decimal equivalents





ICU Locale Explorer

Debian Wiki on Locales
* Article

by Nathan C. Myers
locale(7): Description of multi-language support
- Linux man page


Sort order charts for various operating system locales and database collations

NATSPEC Library


* [http://docs.translatehouse.org/projects/localization-guide/en/latest/guide/start.html?id=guide/start#locales Guides to locales and locale creation on various platforms] Unix user management and support-related utilities Unix SUS2008 utilities Internationalization and localization