Anil
Anil

Reputation: 69

How can we set bot locale so that bot can prompt user based on its locale

How can we set bot locale in node v4. so that, bot can prompt user based on its locale.

in V#3 bot, if we set below value, bot can automatically prompt the user based on its locale. in V#4, how can we implement below logic.

in v#3:
session.preferredLocale(lang);

in v#4, how?

session.preferredLocale(lang);

Upvotes: 0

Views: 46

Answers (1)

Steven Kanberg
Steven Kanberg

Reputation: 6393

The issue is related to what value you are updating locale with. As I mention in this post, locale must be in the format of culture + locale and all lowercase (e.g. 'fr-fr). If you stray from that format, then the prompt defaults to 'en-us'.

There is a PR (here) that addresses the formatting issue.

Hope of help!

Upvotes: 0

Related Questions