Class I18n

java.lang.Object
net.sourceforge.plantuml.utils.I18n

public class I18n extends Object
  • Constructor Details

    • I18n

      public I18n()
  • Method Details

    • getLocalizedValue

      public static String getLocalizedValue(String language, String key, String defaultValue)
      Retrieves a localized value for a given language and key, with the option to specify a default value.
      Parameters:
      language - the language code (e.g., "en", "cn", "fr"); if null, the default locale's language is used
      key - the key for the message to retrieve; must not be null
      defaultValue - the fallback value to return if no translation is found; must not be null
      Returns:
      the localized value corresponding to the key, or the defaultValue if no match is found
      Throws:
      IllegalArgumentException - if key or defaultValue is null