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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLocaleCodes(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, org.bukkit.command.CommandSender sender) Returns all available locales.localeBundle(String language) Translates a String with Placeholders.org.bukkit.plugin.Pluginplugin()voidregisterChild(ILocalizer localizer) voidSets the locale of the localizer instance.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.eldoria.eldoutilities.localization.ILocalizer
localize
-
Constructor Details
-
DummyLocalizer
public DummyLocalizer()
-
-
Method Details
-
plugin
public org.bukkit.plugin.Plugin plugin()- Specified by:
pluginin interfaceILocalizer
-
setLocale
Description copied from interface:ILocalizerSets the locale of the localizer instance.- Specified by:
setLocalein interfaceILocalizer- Parameters:
language- language to set.
-
getMessage
Description copied from interface:ILocalizerGet a message.- Specified by:
getMessagein interfaceILocalizer- Parameters:
key- message key- Returns:
- message with replaced replacements if present.
-
getIncludedLocales
Description copied from interface:ILocalizerReturns all available locales.- Specified by:
getIncludedLocalesin interfaceILocalizer- Returns:
- array of registered locales.
-
includedLocales
Description copied from interface:ILocalizerReturns all available locales.- Specified by:
includedLocalesin interfaceILocalizer- Returns:
- set of registered locales.
-
addLocaleCodes
Description copied from interface:ILocalizerAdd 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:
addLocaleCodesin interfaceILocalizer- Parameters:
runtimeLocaleCodes- map with locales codes to add.
-
getMessage
- Specified by:
getMessagein interfaceILocalizer
-
getValue
- Specified by:
getValuein interfaceILocalizer
-
getMessage
- Specified by:
getMessagein interfaceILocalizer
-
getValue
- Specified by:
getValuein interfaceILocalizer
-
getValue
- Specified by:
getValuein interfaceILocalizer
-
localeBundle
- Specified by:
localeBundlein interfaceILocalizer
-
defaultBundle
- Specified by:
defaultBundlein interfaceILocalizer
-
localize
Description copied from interface:ILocalizerTranslates a String with Placeholders. Can handle multiple messages with replacements. Add replacements in the right order.- Specified by:
localizein interfaceILocalizermessage- Message to translate- Returns:
- Replaced Messages
-
registerChild
- Specified by:
registerChildin interfaceILocalizer
-