No results found

Your search did not match any results.

We suggest you try the following to help find what you're looking for:

  • Check the spelling of your keyword search.
  • Use synonyms for the keyword you typed, for example, try “application” instead of “software.”
  • Try one of the popular searches shown below.
  • Start a new search.

 

Trending Questions

JDK 8 and JRE 8 Supported Locales

The set of supported locales varies between different implementations of the Java Platform Standard Edition (Java SE) as well as between different areas of functionality.

This page documents locale support in Oracle's Java SE Development Kit 8 (JDK) and Java SE Runtime Environment 8 (JRE).

Installer and Supported Languages

The JRE and JDK Installers are localized to the languages specified in the User Interface Translation table. The installers will use the use the system's default locale setting to determine which of the supported languages to use at the time of installation. If the system's default locale is not supported by the installer, the installer will be displayed in English.

The complete international version of the JRE is installed.

Enabled Locales for java.util and java.text Functionality

The support for locale-sensitive behavior in the java.util and java.text packages is almost entirely platform independent, so all locales are supported in the same way and simultaneously, independent of the host operating system and its localization. The only platform dependent functionality is the setting of the initial default locale and the initial default time zone based on the host operating system's locale and time zone.

Oracle's JDK 8 and the JRE 8 support all the locales shown below.

Supported Locales

Language (ISO 639) Country (ISO 3166) Variant Script (ISO 15924) Language Tag Note
Albanian (sq) Albania (AL)   (Latn) sq-AL  
Arabic (ar) Algeria (DZ)   (Arab) ar-DZ  
Arabic (ar) Bahrain (BH)   (Arab) ar-BH  
Arabic (ar) Egypt (EG)   (Arab) ar-EG  
Arabic (ar) Iraq (IQ)   (Arab) ar-IQ  
Arabic (ar) Jordan (JO)   (Arab) ar-JO  
Arabic (ar) Kuwait (KW)   (Arab) ar-KW  
Arabic (ar) Lebanon (LB)   (Arab) ar-LB  
Arabic (ar) Libya (LY)   (Arab) ar-LY  
Arabic (ar) Morocco (MA)   (Arab) ar-MA  
Arabic (ar) Oman (OM)   (Arab) ar-OM  
Arabic (ar) Qatar (QA)   (Arab) ar-QA  
Arabic (ar) Saudi Arabia (SA)   (Arab) ar-SA  
Arabic (ar) Sudan (SD)   (Arab) ar-SD  
Arabic (ar) Syria (SY)   (Arab) ar-SY  
Arabic (ar) Tunisia (TN)   (Arab) ar-TN  
Arabic (ar) United Arab Emirates (AE)   (Arab) ar-AE  
Arabic (ar) Yemen (YE)   (Arab) ar-YE  
Belarusian (be) Belarus (BY)   (Cyrl) be-BY  
Bulgarian (bg) Bulgaria (BG)   (Cyrl) bg-BG  
Catalan (ca) Spain (ES)   (Latn) ca-ES  
Chinese (zh) China (CN)   (Hans) zh-CN  
Chinese (zh) Singapore (SG)   (Hans) zh-SG(*)  
Chinese (zh) Hong Kong (HK)   (Hant) zh-HK  
Chinese (zh) Taiwan (TW)   (Hant) zh-TW  
Croatian (hr) Croatia (HR)   (Latn) hr-HR  
Czech (cs) Czech Republic (CZ)   (Latn) cs-CZ  
Danish (da) Denmark (DK)   (Latn) da-DK  
Dutch (nl) Belgium (BE)   (Latn) nl-BE  
Dutch (nl) Netherlands (NL)   (Latn) nl-NL  
English (en) Australia (AU)   (Latn) en-AU  
English (en) Canada (CA)   (Latn) en-CA  
English (en) India (IN)   (Latn) en-IN  
English (en) Ireland (IE)   (Latn) en-IE  
English (en) Malta (MT)   (Latn) en-MT(*)  
English (en) New Zealand (NZ)   (Latn) en-NZ  
English (en) Philippines (PH)   (Latn) en-PH(*)  
English (en) Singapore (SG)   (Latn) en-SG(*)  
English (en) South Africa (ZA)   (Latn) en-ZA  
English (en) United Kingdom (GB)   (Latn) en-GB  
English (en) United States (US)   (Latn) en-US  
Estonian (et) Estonia (EE)   (Latn) et-EE  
Finnish (fi) Finland (FI)   (Latn) fi-FI  
French (fr) Belgium (BE)   (Latn) fr-BE  
French (fr) Canada (CA)   (Latn) fr-CA  
French (fr) France (FR)   (Latn) fr-FR  
French (fr) Luxembourg (LU)   (Latn) fr-LU  
French (fr) Switzerland (CH)   (Latn) fr-CH  
German (de) Austria (AT)   (Latn) de-AT  
German (de) Germany (DE)   (Latn) de-DE  
German (de) Luxembourg (LU)   (Latn) de-LU  
German (de) Switzerland (CH)   (Latn) de-CH  
Greek (el) Cyprus (CY)   (Grek) el-CY(*)  
Greek (el) Greece (GR)   (Grek) el-GR  
Hebrew (iw) Israel (IL)   (Hebr) iw-IL  
Hindi (hi) India (IN)   (Deva) hi-IN Implicitly specifies the Devanagari numbering system.
Hungarian (hu) Hungary (HU)   (Latn) hu-HU  
Icelandic (is) Iceland (IS)   (Latn) is-IS  
Indonesian (in) Indonesia (ID)   (Latn) in-ID(*)  
Irish (ga) Ireland (IE)   (Latn) ga-IE(*)  
Italian (it) Italy (IT)   (Latn) it-IT  
Italian (it) Switzerland (CH)   (Latn) it-CH  
Japanese (ja) Japan (JP)   (Jpan) ja-JP  
Japanese (ja) Japan (JP) * (Jpan) ja-JP-u-ca-japanese Explicitly specifies the Japanese imperial calendar with java.util.Calendar.
Japanese (ja) Japan (JP) JP (Jpan) ja-JP-x-lvariant-JP Explicitly specifies the Japanese imperial calendar with java.util.Calendar. (For compatibility)
Korean (ko) South Korea (KR)   (Kore) ko-KR  
Latvian (lv) Latvia (LV)   (Latn) lv-LV  
Lithuanian (lt) Lithuania (LT)   (Latn) lt-LT  
Macedonian (mk) Macedonia (MK)   (Cyrl) mk-MK  
Malay (ms) Malaysia (MY)   (Latn) ms-MY(*)  
Maltese (mt) Malta (MT)   (Latn) mt-MT(*)  
Norwegian (no) Norway (NO)   (Latn) no-NO “no” is treated as Norwegian Bokmål.
Norwegian Bokmål (nb) Norway (NO)   (Latn) nb-NO  
Norwegian Nynorsk (nn) Norway (NO)   (Latn) nn-NO  
Norwegian (no) Norway (NO) NY (Latn) no-NO-x-lvariant-NY “no” is treated as Norwegian Nynorsk. (For compatibility)
Polish (pl) Poland (PL)   (Latn) pl-PL  
Portuguese (pt) Brazil (BR)   (Latn) pt-BR(***)  
Portuguese (pt) Portugal (PT)   (Latn) pt-PT(***)  
Romanian (ro) Romania (RO)   (Latn) ro-RO  
Russian (ru) Russia (RU)   (Cyrl) ru-RU  
Serbian (sr) Bosnia and Herzegovina (BA)   (Cyrl) sr-BA(*)  
Serbian (sr) Montenegro (ME)   (Cyrl) sr-ME(*)  
Serbian (sr) Serbia (RS)   (Cyrl) sr-RS(*)  
Serbian (sr) Bosnia and Herzegovina (BA)   Latn sr-Latn-BA(**)  
Serbian (sr) Montenegro (ME)   Latn sr-Latn-ME(**)  
Serbian (sr) Serbia (RS)   Latn sr-Latn-RS(**)  
Slovak (sk) Slovakia (SK)   (Latn) sk-SK  
Slovenian (sl) Slovenia (SI)   (Latn) sl-SI  
Spanish (es) Argentina (AR)   (Latn) es-AR  
Spanish (es) Bolivia (BO)   (Latn) es-BO  
Spanish (es) Chile (CL)   (Latn) es-CL  
Spanish (es) Colombia (CO)   (Latn) es-CO  
Spanish (es) Costa Rica (CR)   (Latn) es-CR  
Spanish (es) Dominican Republic (DO)   (Latn) es-DO  
Spanish (es) Ecuador (EC)   (Latn) es-EC  
Spanish (es) El Salvador (SV)   (Latn) es-SV  
Spanish (es) Guatemala (GT)   (Latn) es-GT  
Spanish (es) Honduras (HN)   (Latn) es-HN  
Spanish (es) Mexico (MX)   (Latn) es-MX  
Spanish (es) Nicaragua (NL)   (Latn) es-NI  
Spanish (es) Panama (PA)   (Latn) es-PA  
Spanish (es) Paraguay (PY)   (Latn) es-PY  
Spanish (es) Peru (PE)   (Latn) es-PE  
Spanish (es) Puerto Rico (PR)   (Latn) es-PR  
Spanish (es) Spain (ES)   (Latn) es-ES  
Spanish (es) United States (US)   (Latn) es-US(*)  
Spanish (es) Uruguay (UY)   (Latn) es-UY  
Spanish (es) Venezuela (VE)   (Latn) es-VE  
Swedish (sv) Sweden (SE)   (Latn) sv-SE  
Thai (th) Thailand (TH)   (Thai) th-TH Implicitly specifies the Latin numbering system and the Thai Buddhist calendar with java.util.Calendar.
Thai (th) Thailand (TH) * (Thai) th-TH-u-ca-buddhist Implicitly specifies the Latin numbering system. Explicitly specifies the Thai Buddhist calendar with java.util.Calendar.
Thai (th) Thailand (TH) * (Thai) th-TH-u-ca-buddhist-nu-thai Explicitly specifies the Thai numbering system and the Thai Buddhist calendar with java.util.Calendar.
Thai (th) Thailand (TH) TH (Thai) th-TH-x-lvariant-TH Explicitly specifies the Thai numbering system and the Thai Buddhist calendar with java.util.Calendar. (For compatibility)
Turkish (tr) Turkey (TR)   (Latn) tr-TR  
Ukrainian (uk) Ukraine (UA)   (Cyrl) uk-UA  
Vietnamese (vi) Vietnam (VN)   (Latn) vi-VN  

(*) Data for these locales are derived from the Unicode Consortium's Common Locale Data Repository release 1.4.1 on an "AS-IS" basis.

(**) Data for these locales are derived from the Unicode Consortium's Common Locale Data Repository release 1.9 on an "AS-IS" basis.

(***) Data for these locales are derived from the Unicode Consortium's Common Locale Data Repository release 21.0.1 on an "AS-IS" basis.

Implicit default scripts are in parentheses. They are not returned from the Locale.getScript() method.

Locales can be constructed with Locale.forLanguageTag(<Language Tag>) or Locale(<Language>, <Country>[, <Variant>]) where <Language Tag> is the Language Tag column value, <Language> is the ISO 639 value, <Country> is the ISO 3166 value, and <Variant> is the Variant column value if it’s neither empty nor *.

Locales can be constructed only with Locale.forLanguageTag(<Language Tag>) if the Variant column value is *.

Numbering Systems

Numbering systems can be specified by a language tag with a numbering system ID, such as th-TH-u-nu-thai. The following are the available numbering system IDs for specifying a numbering system. No algorithmic numbering systems defined in Unicode Locale Data Markup Language (LDML) are supported.

Numbering System ID Numbering System Digit Zero Value
arab Arabic-Indic Digits \u0660
arabext Extended Arabic-Indic Digits \u06f0
bali Balinese Digits \u1b50
beng Bengali Digits \u09e6
cham Cham Digits \uaa50
deva Devanagari Digits \u0996
fullwide Full Width Digits \uff10
gujr Gujarati Digits \u0ae6
guru Gurmukhi Digits \u0a66
java Javanese Digits \ua9d0
kali Kayah Li Digits \ua900
khmr Khmer Digits \u17e0
knda Kannada Digits \u0ce0
lana Tai Tham Hora Digits \u1a80
lanatham Tai Tham Tham Digits \u1a90
laoo Lao Digits \u0ed0
latn Western Digits \u0030
lepc Lepcha Digits \u1c40
limb Limbu Digits \u1946
mlym Malayalam Digits \u0d66
mong Mongolian Digits \u1810
mtei Meetei Mayek Digits \uabf0
mymr Myanmar Digits \u1040
mymrshan Myanmar Shan Digits \u1090
nkoo N'Ko Digits \u07c0
olck Ol Chiki Digits \u1c50
orya Oriya Digits \u0b66
saur Saurashtra Digits \ua8d0
sund Sundanese Digits \u1bb0
talu Telugu Digits \u19d0
tamldec Tamil Digits \u0be6
telu Telugu Digits \u0c66
thai Thai Digits \u0e50
tibt Tibetan Digits \u0f20
vaii Vai Digits \ua620

Locales available from other Providers

In addition to the locales that Oracle's JDK 8 and the JRE 8 provide by default, which is represented by “JRE” as the locale provider name, locales from other locale providers can be used. They can be enabled through “java.locale.providers” system property. Refer to java.util.spi.LocaleServiceProvider class’ class description for more detail. Oracle's JDK 8 and the JRE 8 bundle two extra locale providers as follows:

CLDR: CLDR locales based on the Unicode Consortium’s CLDR release 21.0.1. BreakIterator and Collator data are not adopted.

HOST: This provider enables the default locale(s) (Locale.Category.FORMAT and/or Locale.Category.DISPLAY) utilizing the underlying operating system. This provider is available on Windows platform and Mac OS X platform.

The default “JRE” locale provider’s resources for the Locale.ROOT locale are used if none of the specified locale providers support the requested locale. For example, if only “CLDR” is specified in “java.locale.providers” system property, Collator works as if requested for the ROOT locale because “CLDR” locale provider does not provide Collator locale data. Specifying “CLDR,JRE” supplements the “JRE” locale provider’s Collator functionality, as well as preferring “CLDR” locale provider’s other locale data to “JRE”’s ones.

Enabled Writing Systems for Java Foundation Classes and JavaFX

Overview

For the Java Foundation Classes (AWT, Swing, 2D, input method framework, drag and drop) and JavaFX, locales can generally be characterized by just the writing system; there are no country or language specific distinctions. Writing system support in the JFC/JavaFX depends to some extent on the host operating system, and full support for simultaneous use of multiple languages is not always possible.

We consider a writing system supported by JFC/JavaFX if all functionality provided by JFC/JavaFX works adequately for this writing system in the following situations:

  • On Windows Vista, 7, and 8, when running on a Windows system with UI Language set to a language using that writing system.
  • On Solaris and Linux, when running on a host operating system with the locale set to one using that writing system and one of the encodings shown for that writing system in the table below.
  • On Mac OS X, when running with the Language set to one using that writing system and one of the encodings shown for that writing system in the table below.

Oracle's JDK 8 and the JRE 8 support all writing systems shown below. Peered AWT components are only supported for a subset of the writing systems - see the last column.

Details on various areas of functionality are provided in the sections below.

Supported Writing Systems

Writing System Languages Windows Encodings Solaris Encodings Linux Encodings Mac OS X Encodings Peered AWT Components
Arabic Arabic 1256 8859-6,

UTF-8

UTF-8 UTF-8 unsupported
Chinese (Simplified) Chinese 936,

GB18030

gb2312,

UTF-8,

GBK,

gb18030

GB18030,

UTF-8

UTF-8 supported
Chinese (Traditional) Chinese 950,

HKSCS

cns11643,

UTF-8,

BIG5,

BIG5HK

UTF-8 UTF-8 supported
Cyrillic Belarusian, Russian etc. 1251 8859-5,

KOI8-R,

ANSI1251,

UTF-8

UTF-8 UTF-8 supported
Devanagari Hindi UTF-8 UTF-8 unsupported UTF-8 unsupported
Greek Greek 1253 8859-7 unsupported UTF-8 supported
Hebrew Hebrew 1255 8859-8 UTF-8 UTF-8 unsupported
Japanese Japanese 932 eucJP(1),

UTF-8,

PCK

UTF-8 UTF-8 supported
Korean Korean 949 5601,

UTF-8

UTF-8 UTF-8 supported
Latin - Baltic subset Latvian, Lithuanian 1257 8859-13 unsupported UTF-8 supported
Latin - Central European subset Czech, Hungarian, Polish, etc. 1250 8859-2,

UTF-8

unsupported UTF-8 supported
Latin - Maltese subset Maltese UTF-8 UTF-8 unsupported UTF-8 supported
Latin - Turkic subset Turkish etc. 1254 8859-9,

UTF-8

unsupported UTF-8 supported
Latin - Western European subset English, French, German, Italian, Spanish, Swedish, etc. 1252 8859-1,

8859-15,

UTF-8

ISO-8859-1,

UTF-8

UTF-8 supported
Thai Thai 874 TIS620.2533,

UTF-8

unsupported UTF-8 unsupported

(1) eucJP on Solaris supports the JIS character sets X 0201, X 0208, and X 0212.

Text Input

Support for text input consists of two parts: interpretation of keyboard layouts, and text composition using input methods. For interpretation of keyboard layouts, the JDK relies entirely on the host operating system. For text composition using input methods, JDK supports native input methods using the host operating system's input method manager as well as input methods developed in the Java programming language (excluding JavaFX environment).

Locale support in input methods implemented in the Java programming language depends solely on the set of installed input methods, not on the host operating system and its localization. However, support for the use of input methods implemented in the Java programming language with peered components is implementation dependent - see below.

Support for keyboard layouts and and native input methods varies between platforms.

Windows

On Windows Vista, 7, and 8, the JRE supports use of any keyboard layout or IMM-based input method.

Input methods implemented in the Java programming language are supported in all components but JavaFX nodes, on all versions of Windows.

Solaris and Linux

The JRE supports use of any keyboard layout or input method that can be used with a particular Solaris or Linux locale.

Input methods implemented in the Java programming language are supported in lightweight components (such as Swing text components), but not in peered components (such as AWT text components) or JavaFX nodes.

Mac OS X

The JRE supports use of any input source.

Input methods implemented in the Java programming language are supported in lightweight components (such as Swing text components), but not in peered components (such as AWT text components) or JavaFX nodes.

Text Rendering

Applications have two options for selecting fonts:

  • Using the logical font names Serif, SansSerif, Dialog, DialogInput, Monospaced.
  • Using a physical font, requesting it by name.

Text Rendering in Lightweight Components

When using logical font names, text in at least the writing system of the host locale and the Western European subset of the Latin writing system is supported.

When using physical fonts, we need to distinguish between simple and complex writing systems. Simple writing systems have a one-to-one mapping from characters to glyphs, and glyphs are placed on the baseline continuously from left to right. Complex writing systems may use different glyphs for the same character based on context, may form ligatures, may be written from right to left, and may reorder glyphs during line layout, or may have other rules for placing glyphs (in particular for combining marks).

The 2D text rendering system supports any combination of simple writing systems and the complex writing systems listed in the table above. Within these limitations, the range of supported writing systems is determined by the font. A single TrueType font might provide glyphs covering the entire Unicode character set and a Unicode based character-to-glyph mapping. Given such a font, 2D can support all simple writing systems as well as the complex writing systems shown in the table above. Other complex writing systems are not supported.

Text Rendering in JavaFX

No precise list of supported font rendering locales can be provided since support is largely dependent on the installed platform fonts, and the complex text rendering capabilities of the native platform. However in general this means the capabilities of JavaFX should be similar to those of the platform itself, and for the supported modern desktop platforms this should match or exceed those of the equivalent JFC/Swing text rendering.

The automatic implicit addition of fallback fonts to all FX fonts other than application embedded fonts means that the application should benefit from the broadest locale support no matter which FX font is in use.

Text Rendering in Peered Components

When using logical font names, text in at least the writing system of the host operating system's locale is supported.

Physical fonts are not supported in peered components.

Text Rendering in Printing

There are three printing APIs:

  • The 2D printing API, using the java.awt.print.PrinterJob.getPrinterJob method.
  • The AWT printing API, using the java.awt.Toolkit.getPrintJob method.
  • The pluggable services printing API, using the javax.print package.

Text rendering using the AWT and 2D printing API works to the same extent as text rendering on the screen. Text rendering using the pluggable services printing API depends on the printing service used; the services provided by the JRE work to the same extent as text rendering on the screen.

Drag and Drop

On Windows Vista, 7, and 8, text using the entire Unicode character set can be transferred between applications.

On Solaris and Linux, text in the character encoding of the host operating system's locale can be transferred between applications.

Applications that need to transfer arbitrary text independent of the host operating system, can do so using serialization: Create a Transferable which supports only one flavor: DataFlavor.stringFlavor. This flavor represents the serialized representation of a String. Make sure that the target supports stringFlavor as well. When the transfer occurs, the AWT will serialize out the String on one end and deserialize on the other. This is much slower than a native platform text transfer, but it will succeed where native transfers may not.

User Interface Translation

JRE

The user interface elements provided by the JRE 8, include Swing dialogs, messages written by the runtime environment to the standard output and standard error streams, as well as messages produced by the tools provided with the JRE. These languages are also supported in JavaFX. These user interface elements are localized into the following languages:

Language Locale ID
Chinese (Simplified) zh_CN
Chinese (Traditional) zh_TW
English en
French fr
German de
Italian it
Japanese ja
Korean ko
Portuguese (Brazilian) pt_BR
Spanish es
Swedish sv

JDK

The user interface elements provided by the JDK 8, include messages produced by the tools that are only part of the JDK in addition to the elements provided by the JRE. These languages are also supported in JavaFX. The additional user interface elements are localized into the following languages:

Language Locale ID
Chinese (Simplified) zh_CN
English en
Japanese ja