Udostępnij za pośrednictwem


ResourceBundle.Control.GetFallbackLocale(String, Locale) Method

Definition

Returns a Locale to be used as a fallback locale for further resource bundle searches by the ResourceBundle.getBundle factory method.

[Android.Runtime.Register("getFallbackLocale", "(Ljava/lang/String;Ljava/util/Locale;)Ljava/util/Locale;", "GetGetFallbackLocale_Ljava_lang_String_Ljava_util_Locale_Handler")]
public virtual Java.Util.Locale GetFallbackLocale (string baseName, Java.Util.Locale locale);
[<Android.Runtime.Register("getFallbackLocale", "(Ljava/lang/String;Ljava/util/Locale;)Ljava/util/Locale;", "GetGetFallbackLocale_Ljava_lang_String_Ljava_util_Locale_Handler")>]
abstract member GetFallbackLocale : string * Java.Util.Locale -> Java.Util.Locale
override this.GetFallbackLocale : string * Java.Util.Locale -> Java.Util.Locale

Parameters

baseName
String

the base name of the resource bundle, a fully qualified class name for which ResourceBundle.getBundle has been unable to find any resource bundles (except for the base bundle)

locale
Locale

the Locale for which ResourceBundle.getBundle has been unable to find any resource bundles (except for the base bundle)

Returns

a Locale for the fallback search, or null if no further fallback search is desired.

Attributes

Remarks

Returns a Locale to be used as a fallback locale for further resource bundle searches by the ResourceBundle.getBundle factory method. This method is called from the factory method every time when no resulting resource bundle has been found for baseName and locale, where locale is either the parameter for ResourceBundle.getBundle or the previous fallback locale returned by this method.

The method returns null if no further fallback search is desired.

The default implementation returns the Locale#getDefault() default <code>Locale</code> if the given locale isn't the default one. Otherwise, null is returned.

Java documentation for java.util.ResourceBundle.Control.getFallbackLocale(java.lang.String, java.util.Locale).

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