Java Locale getISO3Language() method

The getISO3Language() method of Java Locale class returns a three-letter abbreviation for this locale's language. If the locale doesn't specify a language, this method will return an empty string. Otherwise, this method will return an uppercase ISO 3166 3-letter language code.

Syntax

Parameter

NA

Return value

This method returns a three-letter abbreviation of this locale's language.

Exception

MissingResourceException: This exception will throw if the three-letter language abbreviation is not available for this locale.

Example 1

Output:

Locale: en_INDIA
Language: eng

Example 2

Output:

Locale1 name: ja_JAPAN
Locale2 name: fr_ECUADOR
Language of locale1: jpn
Language of locale2: fra

Example 3

Output:

Locale1 name: en_INDIA
Locale2 name: ar_EGYPT
Locale3 name: be_BANGLADESH
Language of locale1: eng
Language of locale2: ara
Language of locale3: bel