Class I10nUtils

java.lang.Object
org.craftercms.commons.i10n.I10nUtils

public class I10nUtils extends Object
Utility class for localization stuff.
Author:
avasquez
  • Field Details

  • Method Details

    • getLocalizedMessage

      public static String getLocalizedMessage(String bundleName, String key, Object... args)
      Returns a formatted, localized message according to the specified resource bundle and key.
      Parameters:
      bundleName - the name of the resource bundle where the message format should be
      key - the key of the message format
      args - the args of the message format
      Returns:
      the formatted, localized message
    • getLocalizedMessage

      public static String getLocalizedMessage(ResourceBundle bundle, String key, Object... args)
      Returns a formatted, localized message according to the specified resource bundle and key.
      Parameters:
      bundle - the resource bundle where the message format should be
      key - the key of the message format
      args - the args of the message format
      Returns:
      the formatted, localized message