Locale.DisplayCountry Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a name for the locale's country that is appropriate for display to the user.
public string DisplayCountry { [Android.Runtime.Register("getDisplayCountry", "()Ljava/lang/String;", "")] get; }
[<get: Android.Runtime.Register("getDisplayCountry", "()Ljava/lang/String;", "")>]
member this.DisplayCountry : string
Property Value
The name of the country appropriate to the locale.
- Attributes
Remarks
Returns a name for the locale's country 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, getDisplayCountry() will return "France"; if the locale is en_US and the default Locale.Category#DISPLAY DISPLAY
locale is fr_FR, getDisplayCountry() will return "Etats-Unis". If the name returned cannot be localized for the default Locale.Category#DISPLAY DISPLAY
locale, (say, we don't have a Japanese name for Croatia), 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 country, this function returns the empty string.
Java documentation for java.util.Locale.getDisplayCountry()
.
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.