export LC_ALL=en_US.UTF-8
~/.config/fish/config.fish
LANG
environment variable to en_US.UTF-8
by adding the following line to your your ~/.bash_profile
file:NSLocale
, NSDateFormatter
, NSNumberFormatter
, and NSCalendar
classes—where region information is needed to format data. OS X and iOS use standard language ID and locale ID formats that consist of language and region designators. For example, using a language combined with a region designator, a language ID can distinguish between different languages and regional dialects.Language | ISO 639-1 Code | ISO 639-2 Code |
---|---|---|
English | en | eng |
French | fr | fre |
German | de | ger |
Japanese | ja | jpn |
Hawaiian | no designator | haw |
Region | ISO 3166-1 Code |
---|---|
United States | US |
United Kingdom | GB |
Australian | AU |
France | FR |
Canadian | CA |
en
language designator as the language ID. To specify the English language as it is used in the United Kingdom, use en-GB
as the language ID. Language ID syntax | Examples | Description |
---|---|---|
[language designator] | en for Englishfr for Frenchde for German | Specifies a language only. |
[language designator]-[region designator] | en-AU for English as used in Australiaen-GB for English as used in United Kingdomfr-FR for French as used in Francefr-CA for French as used in Canadade-AT for German as used in Austriade-CH for German as used in Switzerland | Specifies a dialect of a language. |
[language designator]-[script designator] | See Table B-4. | Specifies a script of a language. |
Script language ID | Description |
---|---|
az-Arab | Azerbaijani in the Arabic script. |
az-Cyrl | Azerbaijani in the Cyrillic script. |
az-Latn | Azerbaijani in the Latin script. |
sr-Cyrl | Serbian in the Cyrillic script. |
sr-Latn | Serbian in the Latin script. |
uz-Cyrl | Uzbek in the Cyrillic script. |
uz-Latn | Uzbek in the Latin script. |
zh-Hans | Chinese in the simplified script. |
zh-Hant | Chinese in the traditional script. |
en_GB
, while the locale for English-speaking residents of the United States is en_US
. Locale ID syntax | Examples | Description |
---|---|---|
[language designator] | en fr | An unspecified region where the language is used. |
[language designator]_[region designator] | en_GB zh_HK | The language used by and regional preference of the user. |
[language designator]-[script designator] | az-Arab zh-Hans | An unspecified region where the script is used. |
[language designator]-[script designator]_[region designator] | zh-Hans_HK | The script used by and regional preference of the user. |
zh_HK
, where zh
is the code for Traditional Chinese and HK
is the code for the Hong Kong region. For Simplified Chinese used in Hong Kong, use zh-Hans_HK
as the locale ID, where zh-Hans
is the code for the Simplified Chinese script. NSBundle
class or Core Foundation bundle functions. For example, you could create your own language designators for a language that is not yet listed in the ISO conventions or available as a language in Xcode..lproj
directory exactly.