Java Locale getDisplayLanguage() method

The getDisplayLanguage(Locale inLocale) method of Java Locale class returns a name for the locale's language that is appropriate for display to the user. If possible, the name returned will be localized according to inLocale.

Syntax

Parameter

NA

Return

This method does not return a value.

Example 1

Output:

Locale: en_INDIA
Language of in locale1: English

Example 2

Output:

Locale1 name: en_INDIA
Locale2 name: fr_ECUADOR
Language of in locale1: English
Language of in locale2: French