Udostępnij za pośrednictwem


Locale.DisplayName Property

Definition

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

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

Property Value

The name of the locale appropriate to display.

Attributes

Remarks

Returns a name for the locale that is appropriate for display to the user. This will be the values returned by getDisplayLanguage(), getDisplayScript(), getDisplayCountry(), getDisplayVariant() and optional Unicode extensions assembled into a single string. The non-empty values are used in order, with the second and subsequent names in parentheses. For example: <blockquote> language (script, country, variant(, extension)*)<br> language (country(, extension)*)<br> language (variant(, extension)*)<br> script (country(, extension)*)<br> country (extension)*<br> </blockquote> depending on which fields are specified in the locale. The field separator in the above parentheses, denoted as a comma character, may be localized depending on the locale. If the language, script, country, and variant fields are all empty, this function returns the empty string.

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

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