Class I18nUtils

java.lang.Object
de.xima.fc.gui.common.utils.msg.I18nUtils
Direct Known Subclasses:
MessageUtils, PluginWrapperModel

public class I18nUtils extends Object
  • Constructor Details

    • I18nUtils

      public I18nUtils()
  • Method Details

    • rbValue

      public static String rbValue(String key, Object... params)
      Methode zum Auflösen eines i18n-Keys zum aktuellen Wert Zusätzlich werden Ersetzungen mittels der übergebenen Parameter (1..n) durchgeführt. Das Ersetzungs-Pattern im hinterlegten i18n-Wert muss folgendermaßen sein: {0} ... {n}
      Parameters:
      key - String der i18n-Key
      params - Ersetzungswerte
      Returns:
      String der für die aktuelle Sprache hinterlegte i18n-Wert
    • rbValue

      public static String rbValue(Locale loc, String key, Object... params)
    • rbValueOrDefault

      public static String rbValueOrDefault(Locale loc, String key, String defaultValue, Object... params)
    • rbValue

      public static String rbValue(String bundle, Locale loc, String key, Object... params)
    • rbValueOrDefault

      public static String rbValueOrDefault(String bundle, Locale loc, String key, String defaultValue, Object... params)
    • getLocale

      @Deprecated public static Locale getLocale()
      Gets the locale from the current Faces context, or the default locale when no Faces context is active.
      Returns:
      The locale from the current Faces context, or the default locale if no Faces context is active.
    • getFacesContext

      @Deprecated public static javax.faces.context.FacesContext getFacesContext()
      Deprecated.
      Use Faces.getContext()
      Gets the current Faces context, which requires that the current thread is currently processing an HTTP request to the Faces servlet.
      Returns:
      The current Faces context, null if no such context exists.