Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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'}]

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
160 views
Welcome To Ask or Share your Answers For Others

1 Answer

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:

  • Language of your Skype profile
  • Language of the installed Skype app you are using
  • Language of the operating system where you use Skype

Why I am assuming it is one of those values?

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):

  • 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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...