Interface TranslationHandler
-
- All Superinterfaces:
MessageProducer
- All Known Implementing Classes:
TranslationHandlerImpl
public interface TranslationHandler extends MessageProducer
Allows access to translation messages
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ResourceBundlegetBuiltinResourceBundle(BuiltinLanguage language, Module module)Returns the built-in resource bundle for the given language and module.Map<String,String>getCustomizedKeys(long languageId)Returns the customized keys for the given language's idCyclosResourceBundlegetOriginalEnglishResourceBundle()Returns theCyclosResourceBundlewith the original English keysCyclosResourceBundlegetResourceBundle()Returns theCyclosResourceBundlefor the current userCyclosResourceBundlegetResourceBundle(Language language)Returns theCyclosResourceBundlefor the given languageStringmessage(Language language, MessageKey key, Object... arguments)Returns a translation message for the given language, applying the given arguments, if anyStringmessage(MessageFormat messageFormat, Language language, MessageKey key, Object... arguments)Returns a translation message for the given language, applying the given arguments, if any and formatting the message according to the given message format-
Methods inherited from interface org.cyclos.utils.MessageProducer
message, message
-
-
-
-
Method Detail
-
getBuiltinResourceBundle
ResourceBundle getBuiltinResourceBundle(BuiltinLanguage language, Module module)
Returns the built-in resource bundle for the given language and module. Having a separated cache is important when there are multiple languages sharing the same template. This will avoid multiple copies of the immutable bundles for each module.
-
getCustomizedKeys
Map<String,String> getCustomizedKeys(long languageId)
Returns the customized keys for the given language's id
-
getOriginalEnglishResourceBundle
CyclosResourceBundle getOriginalEnglishResourceBundle()
Returns theCyclosResourceBundlewith the original English keys
-
getResourceBundle
CyclosResourceBundle getResourceBundle()
Returns theCyclosResourceBundlefor the current user
-
getResourceBundle
CyclosResourceBundle getResourceBundle(Language language)
Returns theCyclosResourceBundlefor the given language
-
message
String message(Language language, MessageKey key, Object... arguments)
Returns a translation message for the given language, applying the given arguments, if any
-
message
String message(MessageFormat messageFormat, Language language, MessageKey key, Object... arguments)
Returns a translation message for the given language, applying the given arguments, if any and formatting the message according to the given message format
-
-