简体   繁体   English

如何翻译机器人框架作曲家中的选择?

[英]How to translate choices in bot framework composer?

I'm using MS bot framework composer version 1.1.1我正在使用 MS bot 框架 Composer 版本 1.1.1

I'd like the user to answer a question by typing (or picking) either "yes" or "no" - but I need to support multiple languages (so in German it would be "ja" and "nein").我希望用户通过输入(或选择)“是”或“否”来回答问题 - 但我需要支持多种语言(所以在德语中是“ja”和“nein”)。 Of course I want to have only one bot that can handle all the languages.当然,我只想拥有一个可以处理所有语言的机器人。 When the bot starts, the current language gets chosen (works).当机器人启动时,当前语言被选择(有效)。 What I want to do now is that in the active language a question is displayed, the input yes/no is requested and depending on the input another text is shown.我现在想要做的是在活动语言中显示一个问题,要求输入是/否,并根据输入显示另一个文本。 Not too difficult and not a very special requirement, I think.我认为不太难,也不是很特殊的要求。

I can get this to work adding either "Ask a question -> Confirmation" or "Ask a question -> Multi-choice" BUT only in English.我可以让这个工作添加“提出问题 -> 确认”或“提出问题 -> 多项选择”,但只能用英语。 In both cases I can translate the question but not the choices (suggestions) nor the validation nor the if-check evaluating the answer.在这两种情况下,我都可以翻译问题,但不能翻译选择(建议)、验证或评估答案的 if-check。 What do I have to do to insert a translated text such as ${AnswerYes()} into the choices and the validation and evaluation expressions?我该怎么做才能将诸如 ${AnswerYes()} 之类的翻译文本插入到选择以及验证和评估表达式中?

Inserting a translated text (similar to ${Greeting()} in the tutorials seems the correct approach to me but I cannot get it to work: Whatever I do I always get "AnswerYes does not have an evaluator, it's not a built-in function or a custom function" although I created a translation text with that name. Any idea how to achieve that or is there another way how I can get the desired result?插入翻译文本(类似于教程中的 ${Greeting()} 对我来说似乎是正确的方法,但我无法让它工作:无论我做什么,我总是得到“AnswerYes 没有评估器,它不是内置的函数或自定义函数”,尽管我创建了一个具有该名称的翻译文本。知道如何实现这一点,还是有另一种方法可以获得所需的结果?

It appears that this is now being addressed in R13 of Bot Framework composer see this issue which was only updated 7 days ago : Composer Github Issue似乎现在正在 Bot Framework composer 的 R13 中解决此问题,请参阅仅在 7 天前更新的此问题: Composer Github 问题

R12 is currently in preview so it may be another few months before the team complete R13. R12 目前处于预览阶段,因此团队完成 R13 可能还需要几个月的时间。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM