Skype响应语言参数 [英] Skype response language parameter
问题描述
通过Web Skype向bot发送请求时,它以"en-US"发送语言环境.如何将其更改为任何其他语言? Skype如何自动决定将其发送到美国"?
While sending request to bot through web Skype, it is sending locale as 'en-US'. How I can change it to any other language? How Skype decide automatically to send it to 'en-US'?
'entities':[{'locale':'en-US','country':'US','platform':'Web','type':'clientInfo'}]
'entities': [{'locale': 'en-US', 'country': 'US', 'platform': 'Web', 'type': 'clientInfo'}]
推荐答案
可能的答案
我无权访问Bot Connector来源,因此很难确保我的回答有效,但是我认为您的语言价值来自以下属性之一:
Possible answer
I don't have access to the Bot Connector sources so it will be difficult to ensure that my answer is valid, but I think your language value comes from one of the following properties:
- 您的Skype个人资料的语言
- 您正在使用的已安装Skype应用的语言
- 您使用Skype的操作系统的语言
您可以查看它在其他渠道上的制作方式,特别是如果您查看开放源代码Webchat渠道,则会看到以下
You can have a look how it is made on other channels, in particular if you have a look to the open-source Webchat channel, you will see the following here :
locale: props.locale || (window.navigator as any)["userLanguage"] || window.navigator.language || 'en'
因此在网络聊天中,它正在使用(按优先级排序):
So in the Webchat, it is using (in order of priority):
- 在网络聊天属性中设置的语言环境(例如,来自queryString)
- 导航器的"userLanguage"(如果有)
- 导航器语言
-
en
作为默认值
- the locale set in webchat properties (coming from the queryString for example)
- the "userLanguage" of the navigator if any
- the navigator language if any
en
as default value
这篇关于Skype响应语言参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!