Class LocaleProvider

java.lang.Object
net.simplace.core.service.LocaleProvider

public final class LocaleProvider extends Object
Resource manager for localized strings.
Author:
Andreas Enders
  • Field Details

  • Method Details

    • getInstance

      public static LocaleProvider getInstance()
      Get Singleton instance of LocaleResourceManager.
      Returns:
      a Singleton instance of LocaleResourceManager
    • getInstance

      public static LocaleProvider getInstance(Locale aLocale)
      Get Singleton instance of LocaleResourceManager.
      Parameters:
      aLocale -
      Returns:
      a Singleton instance of LocaleResourceManager
    • getString

      public String getString(String aStringSet, String aKey)
      Get localized string using current locale settings.
      Parameters:
      aStringSet -
      aKey -
      Returns:
      localized string using current locale settings
    • getString

      public String getString(String aKey)
      Get localized string using current locale settings.
      Parameters:
      aKey -
      Returns:
      localized string using current locale settings
    • getString

      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.
      Parameters:
      aStringSet -
      aKey -
      aDefaultValue -
      Returns:
      localized string using current locale settings
    • getString

      public String getString(String aStringSet, String aKey, Locale aLocale)
      Get localized string using specified locale.
      Parameters:
      aStringSet -
      aKey -
      aLocale -
      Returns:
      localized string using specified locale
    • getString

      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.
      Parameters:
      aStringSet -
      aKey -
      aLocale -
      aDefaultValue -
      Returns:
      localized string using specified locale
    • getLocale

      public Locale getLocale()
      Get the locale currently in use by LocaleResourceManager.
      Returns:
      the locale currently in use by LocaleResourceManager
    • setLocale

      public void setLocale(Locale aLocale)
      Use specified locale as default in LocaleResourceManager.
      Parameters:
      aLocale -
    • setInterceptPath

      public void setInterceptPath(URL tInterceptPath)
      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

      public String getLocaleKey()
      Returns:
      the current Locale-Key (de_DE...)
    • setDefaultLanguage

      public void setDefaultLanguage(String aLocalization)
      Parameters:
      aLocalization -