Interface ILocalizer
public interface ILocalizer
Represents a class that can localize strings.
-
Method Summary
Modifier and TypeMethodDescriptionGets a list ofLocales that are currently available.getMessage(String key, Object... args) Retrieves a localized message using the default locale.getMessage(String key, Locale locale, Object... args) Retrieves a localized message.default StringgetStructureType(IStructureConst structure) default StringgetStructureType(StructureType structureType)
-
Method Details
-
getMessage
Retrieves a localized message.- Parameters:
key- The key of the message.locale- TheLocaleto use.args- The arguments of the message, if any.- Returns:
- The localized message associated with the provided key.
-
getMessage
Retrieves a localized message using the default locale.- Parameters:
key- The key of the message.args- The arguments of the message, if any.- Returns:
- The localized message associated with the provided key.
- Throws:
MissingResourceException- When no mapping for the key can be found.
-
getStructureType
- Parameters:
structureType- The structure type to localize.- Returns:
- The localized name of the structure type.
-
getStructureType
-
getAvailableLocales
Gets a list ofLocales that are currently available.- Returns:
- The list of available locales.
-