Locale.Builder.SetLocale(Locale) Method
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.
Resets the Builder to match the provided locale.
[Android.Runtime.Register("setLocale", "(Ljava/util/Locale;)Ljava/util/Locale$Builder;", "")]
public Java.Util.Locale.Builder SetLocale(Java.Util.Locale locale);
[<Android.Runtime.Register("setLocale", "(Ljava/util/Locale;)Ljava/util/Locale$Builder;", "")>]
member this.SetLocale : Java.Util.Locale -> Java.Util.Locale.Builder
Parameters
- locale
- Locale
the locale
Returns
This builder.
- Attributes
Remarks
Resets the Builder to match the provided locale. Existing state is discarded. All fields of the locale must be well-formed, see Locale. Locales with any ill-formed fields cause IllformedLocaleException to be thrown, except for the following three cases which are accepted for compatibility reasons: Locale("ja", "JP", "JP") is treated as "ja-JP-u-ca-japanese"; Locale("th", "TH", "TH") is treated as "th-TH-u-nu-thai"; Locale("no", "NO", "NY") is treated as "nn-NO"
Java reference for java.util.Locale.Builder.setLocale.
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.