Class MessageLocalization

java.lang.Object
org.openpdf.text.error_messages.MessageLocalization

public final class MessageLocalization extends Object
Localizes error messages. The messages are located in the package org.openpdf.text.error_messages in the form language_country.lng. The internal file encoding is UTF-8 without any escape chars, it's not a normal property file. See en.lng for more information on the internal format.
  • Constructor Details

    • MessageLocalization

      public MessageLocalization()
  • Method Details

    • getMessage

      public static String getMessage(String key)
      Get a message without parameters.
      Parameters:
      key - the key to the message
      Returns:
      the message
    • getComposedMessage

      public static String getComposedMessage(String key)
      Get a message without parameters.
      Parameters:
      key - the key to the message
      Returns:
      the message
    • getComposedMessage

      public static String getComposedMessage(String key, Object p1)
      Get a message with one parameter. The parameter will replace the string "{1}" found in the message.
      Parameters:
      key - the key to the message
      p1 - the parameter
      Returns:
      the message
    • getComposedMessage

      public static String getComposedMessage(String key, int p1)
      Get a message with one parameter. The parameter will replace the string "{1}" found in the message.
      Parameters:
      key - the key to the message
      p1 - the parameter
      Returns:
      the message
    • getComposedMessage

      public static String getComposedMessage(String key, Object p1, Object p2)
      Get a message with one parameter. The parameter will replace the string "{1}", "{2}" found in the message.
      Parameters:
      key - the key to the message
      p1 - the parameter
      p2 - the parameter
      Returns:
      the message
    • getComposedMessage

      public static String getComposedMessage(String key, Object p1, Object p2, Object p3, Object p4)
      Get a message with two parameters. The parameters will replace the strings "{1}", "{2}", "{3}", "{4}" found in the message.
      Parameters:
      key - the key to the message
      p1 - the parameter
      p2 - the parameter
      p3 - the parameter
      p4 - the parameter
      Returns:
      the message