Class ILocalizer.DummyLocalizer
java.lang.Object
de.eldoria.eldoutilities.localization.ILocalizer.DummyLocalizer
- All Implemented Interfaces:
ILocalizer
- Enclosing interface:
- ILocalizer
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.eldoria.eldoutilities.localization.ILocalizer
ILocalizer.DummyLocalizer
-
Field Summary
Fields inherited from interface de.eldoria.eldoutilities.localization.ILocalizer
DEFAULT, LOCALIZATION_CODE, LOCALIZER
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addLocaleCodes
(Map<String, String> runtimeLocaleCodes) Add requested locale codes in runtime.String[]
Returns all available locales.getMessage
(String key) Get a message.getMessage
(String key, String language) getMessage
(String key, CommandSender sender) getValue
(String key, CommandSender sender) Returns all available locales.localeBundle
(String language) localize
(CommandSender sender, String message) Translates a String with Placeholders.plugin()
void
registerChild
(ILocalizer localizer) void
Sets the locale of the localizer instance.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.eldoria.eldoutilities.localization.ILocalizer
localize
-
Constructor Details
-
DummyLocalizer
public DummyLocalizer()
-
-
Method Details
-
plugin
- Specified by:
plugin
in interfaceILocalizer
-
setLocale
Description copied from interface:ILocalizer
Sets the locale of the localizer instance.- Specified by:
setLocale
in interfaceILocalizer
- Parameters:
language
- language to set.
-
getMessage
Description copied from interface:ILocalizer
Get a message.- Specified by:
getMessage
in interfaceILocalizer
- Parameters:
key
- message key- Returns:
- message with replaced replacements if present.
-
getIncludedLocales
Description copied from interface:ILocalizer
Returns all available locales.- Specified by:
getIncludedLocales
in interfaceILocalizer
- Returns:
- array of registered locales.
-
includedLocales
Description copied from interface:ILocalizer
Returns all available locales.- Specified by:
includedLocales
in interfaceILocalizer
- Returns:
- set of registered locales.
-
addLocaleCodes
Description copied from interface:ILocalizer
Add requested locale codes in runtime.This has to be done before calling
ILocalizer.setLocale(String)
Every key has one default value which will be added to the file if the key is not present.
- Specified by:
addLocaleCodes
in interfaceILocalizer
- Parameters:
runtimeLocaleCodes
- map with locales codes to add.
-
getMessage
- Specified by:
getMessage
in interfaceILocalizer
-
getValue
- Specified by:
getValue
in interfaceILocalizer
-
getMessage
- Specified by:
getMessage
in interfaceILocalizer
-
getValue
- Specified by:
getValue
in interfaceILocalizer
-
getValue
- Specified by:
getValue
in interfaceILocalizer
-
localeBundle
- Specified by:
localeBundle
in interfaceILocalizer
-
defaultBundle
- Specified by:
defaultBundle
in interfaceILocalizer
-
localize
Description copied from interface:ILocalizer
Translates a String with Placeholders. Can handle multiple messages with replacements. Add replacements in the right order.- Specified by:
localize
in interfaceILocalizer
message
- Message to translate- Returns:
- Replaced Messages
-
registerChild
- Specified by:
registerChild
in interfaceILocalizer
-