如何验证Bot框架中的本地化是否正常工作 [英] How to verify if localization is working correctly in Bot framework

查看:117
本文介绍了如何验证Bot框架中的本地化是否正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用RView和MAT工具为法语创建资源文件,如

I have used RView and MAT tools to create resource files for french language as described in https://docs.microsoft.com/en-us/bot-framework/dotnet/bot-builder-dotnet-formflow-localize to localize the form flow. How can I verify if the localization is working correctly. Basically I need a way to test the form flow in my emulator in French language. What's the best/right way to set the CurrentUICulture or to test this out?

推荐答案

您可以在bot模拟器中设置语言环境,如下所示:

You can set locale in bot emulator like this:

然后,关键问题是Bot SDK是否可以从客户端渠道获取区域设置信息,并根据该信息自动设置区域性信息.我找不到任何可以指出此问题的官方文件,我们只能对此进行测试.

Then the point problem is that whether Bot SDK can get locale info from client channels and automatically set culture info based on that. I couldn't find any official documents that can point out this problem, we can only run test on that.

如果漫游器无法从客户端获取语言环境,则有两种解决方法来解决此问题.

If the bot can't get locale from client side, there're two workarounds to solve this issue.

  1. 要提示用户,请显示对话框,让用户选择首选语言,然后我们可以将用户的选择保存在例如azure存储表中.

  1. To prompt user, show dialog to let user choose preferred language, and then we can save user's choice for example in a table of azure storage.

使用文本分析API 根据用户的输入自动检测用户的语言.

Use Text Analytics API to automatically detect the user's language based upon user's input.

这篇关于如何验证Bot框架中的本地化是否正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆