net.simplace.util.service.LocaleProvider

Resource manager for localized strings.


public final class LocaleProvider {

// Constants
public static final String DEFAULT_EMPTY;
public static final String CUSTOMER_PREFIX;

// Class Methods
public static LocaleProvider getInstance();

Get Singleton instance of LocaleResourceManager.
returns a Singleton instance of LocaleResourceManager
public static LocaleProvider getInstance(Locale aLocale);

Get Singleton instance of LocaleResourceManager.
returns a Singleton instance of LocaleResourceManager

// Public Instance Methods
public String getString(String aStringSet, String aKey);

Get localized string using current locale settings.
returns localized string using current locale settings
public String getString(String aKey);

Get localized string using current locale settings.
returns localized string using current locale settings
public String getString(String aStringSet, String aKey, String aDefaultValue);

Get localized string using current locale settings. Also giving a default value which will be used, when the locale is not found.
returns localized string using current locale settings
public String getString(String aStringSet, String aKey, Locale aLocale);

Get localized string using specified locale.
returns localized string using specified locale
public String getString(String aStringSet, String aKey, Locale aLocale,
String aDefaultValue);

Get localized string using specified locale. Also giving a default value which will be used, when the locale is not found.
returns localized string using specified locale
public Locale getLocale();

Get the locale currently in use by LocaleResourceManager.
returns the locale currently in use by LocaleResourceManager
public void setLocale(Locale aLocale);

Use specified locale as default in LocaleResourceManager.
public void setInterceptPath(URL tInterceptPath);

Decides, if the localeresourcemanager should look for locales bundles on hard disc.
public void resetLocale();

Reset LocaleResourceManager to VM's default locale settings.
public String getLocaleKey();


returns the current Locale-Key (de_DE...)
public void setDefaultLanguage(String aLocalization);



}



Returned by: getInstance(), getInstance()