public async Task SendMessageAsync(ITurnContext turnContext, string message) { var state = await Accessors.CustomerDataState.GetAsync(turnContext); if (state.ChoosenLanguage != null) { var text = await Translator.TranslateText(message, state.ChoosenLanguage); await turnContext.SendActivityAsync(MessageFactory.Text(text)); } else { await turnContext.SendActivityAsync(MessageFactory.Text(message)); } }
public override void Process(TagHelperContext context, TagHelperOutput output) { string strContent = output.GetChildContentAsync().Result.GetContent(); output.Content.AppendHtml(_ITextTranslator.TranslateText(strContent)); }