Partager via


Locale.LanguageRange Constructors

Definition

Overloads

Locale.LanguageRange(String)

Constructs a LanguageRange using the given range.

Locale.LanguageRange(String, Double)

Constructs a LanguageRange using the given range and weight.

Locale.LanguageRange(String)

Constructs a LanguageRange using the given range.

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "", ApiSince=26)]
public LanguageRange (string range);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "", ApiSince=26)>]
new Java.Util.Locale.LanguageRange : string -> Java.Util.Locale.LanguageRange

Parameters

range
String

a language range

Attributes

Remarks

Constructs a LanguageRange using the given range. Note that no validation is done against the IANA Language Subtag Registry at time of construction.

This is equivalent to LanguageRange(range, MAX_WEIGHT).

Java documentation for java.util.Locale.LanguageRange.Locale$LanguageRange(java.lang.String).

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

Locale.LanguageRange(String, Double)

Constructs a LanguageRange using the given range and weight.

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;D)V", "", ApiSince=26)]
public LanguageRange (string range, double weight);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;D)V", "", ApiSince=26)>]
new Java.Util.Locale.LanguageRange : string * double -> Java.Util.Locale.LanguageRange

Parameters

range
String

a language range

weight
Double

a weight value between MIN_WEIGHT and MAX_WEIGHT

Attributes

Remarks

Constructs a LanguageRange using the given range and weight. Note that no validation is done against the IANA Language Subtag Registry at time of construction.

Java documentation for java.util.Locale.LanguageRange.Locale$LanguageRange(java.lang.String, double).

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