Closed Clooney24 closed 2 years ago
Hi @Clooney24
I assume you are using simple choices
or structured choices
, correct?
@dmvtech yes in that case it was a confirm input. The text of the options are in correct language but the seperator not. English output it is correct "(1) Yes or (2) No" and in German output is "(1) Ja or (2) Nein" but should be "(1) Ja oder (2) Nein".
Hi @Clooney24 Thanks for your patience. There is a limitation in this situation. Unfortunately using an expression to a template such as ${OrSeparator()}
(where that template has the appropriate word set for the locale in each .lg) didn't work. (I believe because as it's not a response it itself; it wouldn't go through that path).
The end goal should be able to be done with a non-trivial expression. I'm working on getting an example for you.
Hi @Clooney24
It is partially more trivial than I thought.
For choices, you can of course use something like:
# FoodChoices()
- ["Obst", "Brot"]
# FoodChoices()
- ["Bread","Fruit"]
But for the or
separator, I have found that if using an expression, even an empty one, that it does the translation automatically. I have no idea why or how, this is being done, but it is the case.
The bad part there, is that Composer won't like to 'keep' an empty expression. I have noticed it rolling back to object type for choice options (with English options) instead of expression (when the field is left empty).
But that can be easily remedied by using an expression for choice options, to a dummy template:
=${OrSeparator()}
# OrSeparator()
- Some bogus text here
Conversely, I tried setting actual templates to be used, and that did not work (but still did automatic translation of choice options. No different than a dummy template):
# OrSeparator()
- [", "," oder2 ",", oder2 ",true]
# OrSeparator()
- [", "," or2 ",", or2 ",true]
I'll look into this latter issue, but please test with the 'dummy' template and see if that works at all for you.
@Clooney24, @dmvtech i confirmed that LG subsystem isn't wired up to choiceOptions yet.
So, we can't support using LG for multi-lang at this moment, what we have now is a few default hard-coded separators defined in here https://github.com/microsoft/botbuilder-dotnet/blob/f1a16c0e215b2815f24752b1c0d7d654cfcc1274/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Input/ChoiceInput.cs#L45.
Moving to botbuilder-dotnet
Teeing up for R15
Hi @tracyboehrer, we forgot to assign this issue to us, but here you have the PR that fixes it: #6366
Describe the bug
I run a multi language composer bot but in User Input control, I only can set a single language text for inline separators.
Version
Version: 1.4.1 Electron: 8.2.4 Chrome: 80.0.3987.165 NodeJS: 12.13.0 V8: 8.0.426.27-electron.0
To Reproduce
Steps to reproduce the behavior:
Expected behavior
use expression to fetch language specific text from lg-templates
Screenshots