Package ai.tock.bot.engine
Interface I18nTranslator
-
- 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 ConnectorTypegetSourceConnectorType()The source ConnectorType used for the response. abstract ConnectorTypegetTargetConnectorType()The target ConnectorType used for the response. abstract StringgetContextId()The current context identifier. -
-
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.
-
getSourceConnectorType
abstract ConnectorType getSourceConnectorType()
The source ConnectorType used for the response. The connector which initialize a conversation
-
getTargetConnectorType
abstract ConnectorType getTargetConnectorType()
The target ConnectorType used for the response. The connector used to fabric messages (bot responses)
-
getContextId
abstract String getContextId()
The current context identifier.
-
-
-
-