-
- All Implemented Interfaces:
-
ai.tock.translator.I18nKeyProvider
public interface I18nTranslator implements I18nKeyProviderTranslates CharSequence depending of current userLocale, userInterfaceType and targetConnectorType.
-
-
Method Summary
Modifier and Type Method Description TranslatedSequencetranslate(CharSequence text, Object args)Translates and format if needed the text with the optionals args. TranslatedSequencetranslate(CharSequence text, List<Object> args)Translates and format if needed the text with the optionals args. TranslatedSequencetranslate(I18nLabelValue key)Translates the specified key. TranslatedSequencetranslateAndReturnBlankAsNull(CharSequence s)Translates the specified text and return null if the answer is blank. abstract LocalegetUserLocale()The current user Locale. abstract UserInterfaceTypegetUserInterfaceType()The current user interface type. abstract ConnectorTypegetTargetConnectorType()The ConnectorType used for the response. abstract StringgetContextId()The current context identifier. -
Methods inherited from class ai.tock.translator.I18nKeyProvider
equals, hashCode, toString -
Methods inherited from class ai.tock.bot.engine.I18nTranslator
i18n, i18n -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
translate
TranslatedSequence translate(CharSequence text, Object args)
Translates and format if needed the text with the optionals args.
-
translate
TranslatedSequence translate(CharSequence text, List<Object> args)
Translates and format if needed the text with the optionals args.
-
translate
TranslatedSequence translate(I18nLabelValue key)
Translates the specified key.
-
translateAndReturnBlankAsNull
TranslatedSequence translateAndReturnBlankAsNull(CharSequence s)
Translates the specified text and return null if the answer is blank.
-
getUserLocale
abstract Locale getUserLocale()
The current user Locale.
-
getUserInterfaceType
abstract UserInterfaceType getUserInterfaceType()
The current user interface type.
-
getTargetConnectorType
abstract ConnectorType getTargetConnectorType()
The ConnectorType used for the response.
-
getContextId
abstract String getContextId()
The current context identifier.
-
-
-
-