Philipp Chudinov
Philipp Chudinov

Reputation: 13

How to set up localization for BotFramework node bot?

I need a way to switch languages via bot commands, that is to pass somewhere language id like 'en' or 'fr' for the framework (ILocalizer)localizer to use. The problem is I can't find how do I tell the framework what language it should use for the session. Or user. Or message.

Originally I thought there should be something like session.setLanguage/Locale - there's not. What am I missing?

The only thing I've found so far is setLanguage, which is "DEPRECATED use local() instead.". BUT there's no local() definition ( https://docs.botframework.com/en-us/node/builder/chat-reference/classes/_botbuilder_d_.message.html#setlanguage).

Upvotes: 1

Views: 726

Answers (1)

Shaswat Rungta
Shaswat Rungta

Reputation: 3805

Going through the examples in the BotBuilder Git repository, I see there is a localization example

Link : https://github.com/Microsoft/BotBuilder/tree/master/Node/examples/basics-localization

Please see if this is what you need.

Upvotes: 1

Related Questions