Interface TranslationStore.StringBased<T>
- Type Parameters:
T- the type of the translation
- All Superinterfaces:
TranslationStore<T>, Translator
- All Known Subinterfaces:
MiniMessageTranslationStore
- All Known Implementing Classes:
AbstractTranslationStore.StringBased
- Enclosing interface:
TranslationStore<T>
An abstract, string-based translation store.
This class extends upon the standard abstract translation store by adding support for reading from resource bundles.
- Since:
- 4.20.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface TranslationStore
TranslationStore.StringBased<T> -
Method Summary
Modifier and TypeMethodDescriptionvoidregisterAll(Locale locale, Path path, boolean escapeSingleQuotes) Registers a resource bundle of translations.voidregisterAll(Locale locale, ResourceBundle bundle, boolean escapeSingleQuotes) Registers a resource bundle of translations.Methods inherited from interface TranslationStore
canTranslate, contains, contains, defaultLocale, register, registerAll, registerAll, unregisterMethods inherited from interface Translator
hasAnyTranslations, name, translate, translate
-
Method Details
-
registerAll
Registers a resource bundle of translations.- Parameters:
locale- a localepath- a path to the resource bundleescapeSingleQuotes- whether to escape single quotes- Throws:
IllegalArgumentException- if a translation key already exists- Since:
- 4.20.0
- See Also:
-
registerAll
Registers a resource bundle of translations.- Parameters:
locale- a localebundle- a resource bundleescapeSingleQuotes- whether to escape single quotes- Throws:
IllegalArgumentException- if a translation key already exists- Since:
- 4.20.0
-