Package net.simplace.core.service
Class LocaleProvider
java.lang.Object
net.simplace.core.service.LocaleProvider
Resource manager for localized strings.
- Author:
- Andreas Enders
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic LocaleProvider
Get Singleton instance of LocaleResourceManager.static LocaleProvider
getInstance
(Locale aLocale) Get Singleton instance of LocaleResourceManager.Get the locale currently in use by LocaleResourceManager.Get localized string using current locale settings.Get localized string using current locale settings.Get localized string using current locale settings.Get localized string using specified locale.Get localized string using specified locale.void
Reset LocaleResourceManager to VM's default locale settings.void
setDefaultLanguage
(String aLocalization) void
setInterceptPath
(URL tInterceptPath) Decides, if the localeresourcemanager should look for locales bundles on hard disc.void
Use specified locale as default in LocaleResourceManager.
-
Field Details
-
DEFAULT_EMPTY
default for empty locales- See Also:
-
CUSTOMER_PREFIX
Customer prefix for CustomerLocaleBundel files- See Also:
-
-
Method Details
-
getInstance
Get Singleton instance of LocaleResourceManager.- Returns:
- a Singleton instance of LocaleResourceManager
-
getInstance
Get Singleton instance of LocaleResourceManager.- Parameters:
aLocale
-- Returns:
- a Singleton instance of LocaleResourceManager
-
getString
Get localized string using current locale settings.- Parameters:
aStringSet
-aKey
-- Returns:
- localized string using current locale settings
-
getString
Get localized string using current locale settings.- Parameters:
aKey
-- Returns:
- localized string using current locale settings
-
getString
Get localized string using current locale settings. Also giving a default value which will be used, when the locale is not found.- Parameters:
aStringSet
-aKey
-aDefaultValue
-- Returns:
- localized string using current locale settings
-
getString
Get localized string using specified locale.- Parameters:
aStringSet
-aKey
-aLocale
-- Returns:
- localized string using specified locale
-
getString
Get localized string using specified locale. Also giving a default value which will be used, when the locale is not found.- Parameters:
aStringSet
-aKey
-aLocale
-aDefaultValue
-- Returns:
- localized string using specified locale
-
getLocale
Get the locale currently in use by LocaleResourceManager.- Returns:
- the locale currently in use by LocaleResourceManager
-
setLocale
Use specified locale as default in LocaleResourceManager.- Parameters:
aLocale
-
-
setInterceptPath
Decides, if the localeresourcemanager should look for locales bundles on hard disc.- Parameters:
tInterceptPath
-
-
resetLocale
public void resetLocale()Reset LocaleResourceManager to VM's default locale settings. -
getLocaleKey
- Returns:
- the current Locale-Key (de_DE...)
-
setDefaultLanguage
- Parameters:
aLocalization
-
-