Localizer (Apache Tomcat 9.0.120 API Documentation)
Description: declaration: package: org.apache.jasper.compiler, class: Localizer

# Class Localizer

java.lang.Object
org.apache.jasper.compiler.Localizer

public class Localizer extends Object
Class responsible for converting error codes to corresponding localized error messages.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Localizer()`
  Default constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static String`
  `getMessage(String errCode)`
  Returns the localized error message corresponding to the given error code.
  `static String`
  `getMessage(String errCode, Object... args)`
  Returns the localized error message corresponding to the given error code.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Localizer

    public Localizer()
    Default constructor.

- ## Method Details

  - ### getMessage

    public static String getMessage(String errCode)
    Returns the localized error message corresponding to the given error code. If the given error code is not defined in the resource bundle for localized error messages, it is used as the error message.
    Parameters:
      `errCode` - Error code to localize
    Returns:
      Localized error message

  - ### getMessage

    public static String getMessage(String errCode, Object... args)
    Returns the localized error message corresponding to the given error code. If the given error code is not defined in the resource bundle for localized error messages, it is used as the error message.
    Parameters:
      `errCode` - Error code to localize
      `args` - Arguments for parametric replacement
    Returns:
      Localized error message