Class PersonalizedLocalizer
java.lang.Object
nl.pim16aap2.animatedarchitecture.core.localization.PersonalizedLocalizer
- All Implemented Interfaces:
ILocalizer
A localizer that uses a specific locale for localization.
This is used to localize messages for a specific client.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ILocalizer
ILocalizer.DummyLocalizer -
Field Summary
Fields inherited from interface ILocalizer
NULL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets a list ofLocales that are currently available.getMessage(String key, Object... args) Retrieves a localized message using the default locale.getMessage(String key, @Nullable Locale clientLocale, Object... args) Deprecated.Using this method will override the locale set in the constructor.inthashCode()toString()
-
Constructor Details
-
PersonalizedLocalizer
-
-
Method Details
-
getMessage
Deprecated.Using this method will override the locale set in the constructor. UsegetMessage(String, Object...)instead.Description copied from interface:ILocalizerRetrieves a localized message.- Specified by:
getMessagein interfaceILocalizer- Parameters:
key- The key of the message.clientLocale- The Locale configured for the client. If the configuration does not allow client-specific locales or if the provided Locale is null, this parameter is ignored.args- The arguments of the message, if any.- Returns:
- The localized message associated with the provided key.
-
getMessage
Description copied from interface:ILocalizerRetrieves a localized message using the default locale.- Specified by:
getMessagein interfaceILocalizer- Parameters:
key- The key of the message.args- The arguments of the message, if any.- Returns:
- The localized message associated with the provided key.
-
getAvailableLocales
Description copied from interface:ILocalizerGets a list ofLocales that are currently available.- Specified by:
getAvailableLocalesin interfaceILocalizer- Returns:
- The list of available locales.
-
toString
-
equals
-
hashCode
-