Package net.sourceforge.plantuml.utils
Class I18n
java.lang.Object
net.sourceforge.plantuml.utils.I18n
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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.
-
Constructor Details
-
I18n
public I18n()
-
-
Method Details
-
getLocalizedValue
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 usedkey
- the key for the message to retrieve; must not be nulldefaultValue
- 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
- ifkey
ordefaultValue
is null
-