Package org.nuclos.api.context
Interface TranslationContext
- All Superinterfaces:
- LogContext
TranslationContext represents the context used in a
 Translator.translate(TranslationContext) translate(TranslationContext)}.
 All information that is available for translation.
- 
Method SummaryModifier and TypeMethodDescriptionGets the localization key for this translation.Gets the source locale of the text.Gets the target locale for translation.getText()Gets the text to be translated.default booleanisCached()Determines if this translation should be cached.booleanDetermines if this is an in-memory translation that should not be persisted.booleanDetermines if this is a persistent translation that should be stored.Methods inherited from interface org.nuclos.api.context.LogContextlog, logError, logWarn
- 
Method Details- 
getTargetLocaleGets the target locale for translation.- Returns:
- The target locale
 
- 
getSourceLocaleLocale getSourceLocale()Gets the source locale of the text.- Returns:
- The source locale, or null if no specific source locale is defined
 
- 
getTextGets the text to be translated.- Returns:
- The text to translate
 
- 
getLocalizationKeyString getLocalizationKey()Gets the localization key for this translation.- Returns:
- The localization key, or null if no specific key is defined
 
- 
isInMemoryTranslationboolean isInMemoryTranslation()Determines if this is an in-memory translation that should not be persisted.- Returns:
- true if this is an in-memory translation, false otherwise
 
- 
isPersistentTranslationboolean isPersistentTranslation()Determines if this is a persistent translation that should be stored.- Returns:
- true if this is a persistent translation, false otherwise
 
- 
isCacheddefault boolean isCached()Determines if this translation should be cached. A translation is cached if it is either an in-memory or a persistent translation.- Returns:
- true if this translation should be cached, false otherwise
 
 
-