Question
Canadian Imperial Bank of Commerce
CA
Last activity: 3 Dec 2021 7:31 EST
localize pega chatbot
Hi
We have implemented OOTB Pega platform web chat embedded within our application. We want to now localize the chatbot.
We are planning to use the existing model and add language to it. All utterances would be translated in french. We want the english utterance and the corresponding french utterance point to the same entity or internal command.
While we are localizing all paragraphs used for responses, I am not sure how to localize the Menu labels when response type is Menu
Please let me know how to localize the Menu labels.
(One way i could think is to use getlocalizedText function on the menu lables (.pyChoices) before the content is rendered to the user. However that would change the case data directly in French which I dont want)
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Canadian Imperial Bank of Commerce
CA
@AnkujJ44 Menu labels can be localized by creating field values with field name pyButtonLabel.
The problem is that we have a toggle language feature in our application, If the user toggles between 2 languages then the any text for which field value is created such as menu labels would get translated in appropriate language, however any paragraphs wont. Thus some content would be in user's language and some content in the language before the toggle.
Pegasystems Inc.
IN
@AnkujJ44 this is something which is on our roadmap and it'll be available OOTB. Your implementation seems correct for the time.
I'm not sure why paragraphs won't change the language. How are you toggling session language?
Updated: 11 Nov 2021 8:16 EST
Canadian Imperial Bank of Commerce
CA
We support 2 languages, when user toggles we change their locale so that their ruleset stack changes accordingly
The historical chat is already stored in the original language.
Say a user is currently in French locale, and asked a question. Since their language is french, Pega picks up the _fr rulesets and gets the french paragraphs for them. However the content of this french paragraph is now stored in the DB. when the user changes their language to English, the historical content would continue to show in the same language as it was stored. Menu label were in English and were earlier masked by their french fieldvalues. Thus historical menu labels will show in English. On the same conversation user will see the paragraph portion in french and menu choices in English.
To get around this issue of content in mixed languages, we are taking the approach of not creating fieldvalues but rather creating taxnomoy in english as well as in french on the same bot.
i.e. Hello maps to "Greeting" and Bonjour maps to "salutation"
Could you please provide a brief about what we can expect on the roadmap OOTB. We could plan keeping that in mind
-
Raju Botu
Pegasystems Inc.
IN
@AnkujJ44 I'd advise against creating separate taxonomy. We don't want separate taxonomies for each language. Emailbot currently supports multiple languages but uses single taxonomy for all languages with different keywords and utterances for each. Same is the case with multi-lingual chatbots, the development of which is currently underway.
@grabm would you please look at this query from Ankuj and see if our product direction aligns with this.
-
Mariusz Grabowski Raju Botu
Pegasystems Inc.
PL
Hi @AnkujJ44,
Multi-Language support is being added to the Digital Messaging channel in 8.7 release. As Vikas has mentioned it is better to have one, single topic (and corresponding command) with language versions (so one greeting which will be triggered despite if hello or salutation will be used). So preferred way is to use field values and OOTB feature is using field values in 8.7.
Additionally after selecting menu item there is label displayed instead of post-back value in the history so using field value will work in such a context.
Hope it helps.
Best regards Mariusz Grabowski
Canadian Imperial Bank of Commerce
CA
@VikasRaidhan I agree creating a single topic for multiple languages is the way to go.
But how do we handle the situation when a user toggles the language on the same session.
Their earlier conversations would be seen in mixed languages. Example
Say Welcome Message is Para1_En
Menu1_en
Menu2_en
Since we will create field values for Menus when the user toggles language to say "French" they will
Para1_En (this is fetched from what is stored)
Menu1_fr
Menu2_fr
How do we solve this issue if we have the same topic for multiple languages
Updated: 3 Dec 2021 7:31 EST
Pegasystems Inc.
PL
@AnkujJ44 thank you very much for sharing those details, at first I thought the issue was with the post back value being displayed to the user in English.
Behavior that you have described may suggest that you have localized not field values prepared by the channel interface but generated OOTB "Pega UI" ones... in order to change the behavior you may want to turn off "Localize" option within "Generation options" (in HTML tab) of the pySimulatorChoice in the Data-Channel-Message class.
However the result would be that even after switching the language messages already sent will not get translated. In other words both "menu text" and options will remain in English. Currently expected behavior is that something what has been sent before language change will remain in first language and only after change new messages will be served translated to the new language.
On the same time, based on your feedback we will create roadmap item to handle the scenario with the welcome message. Where expected behavior will be that whenever user changes the language the welcome message will get refreshed and will be served in proper language. Please be informed that this change will be implemented in Digital Messaging Channel only.
Kind regards Mariusz