Share via


Locale.DisplayLanguage Property

Definition

Returns a name for the locale's language that is appropriate for display to the user.

public string DisplayLanguage { [Android.Runtime.Register("getDisplayLanguage", "()Ljava/lang/String;", "")] get; }
[<get: Android.Runtime.Register("getDisplayLanguage", "()Ljava/lang/String;", "")>]
member this.DisplayLanguage : string

Property Value

The name of the display language.

Attributes

Remarks

Returns a name for the locale's language that is appropriate for display to the user. If possible, the name returned will be localized for the default Locale.Category#DISPLAY DISPLAY locale. For example, if the locale is fr_FR and the default Locale.Category#DISPLAY DISPLAY locale is en_US, getDisplayLanguage() will return "French"; if the locale is en_US and the default Locale.Category#DISPLAY DISPLAY locale is fr_FR, getDisplayLanguage() will return "anglais". If the name returned cannot be localized for the default Locale.Category#DISPLAY DISPLAY locale, (say, we don't have a Japanese name for Croatian), this function falls back on the English name, and uses the ISO code as a last-resort value. If the locale doesn't specify a language, this function returns the empty string.

Java documentation for java.util.Locale.getDisplayLanguage().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to