page_type | description | urlFragment | products | languages | extensions | contentType | createdDate | ||||
---|---|---|---|---|---|---|---|---|---|---|---|
sample |
Microsoft Teams app localization using Bot and Tab |
teams-app-localization-nodejs |
|
|
samples |
07-07-2021 13:38:25 |
This sample illustrates how to implement Localization for Microsoft Teams apps.
-
Node.js version 10.14 or higher
# determine node version node --version
-
Register a bot with Azure Bot Service, following the instructions here.
-
Ensure that you've enabled the Teams Channel
-
While registering the bot, use
https://<your_ngrok_url>/api/messages
as the messaging endpoint.NOTE: When you create your bot you will create an App ID and App password - make sure you keep these for later.
-
Clone the repository
git clone https://github.com/OfficeDev/Microsoft-Teams-Samples.git
-
In a terminal, navigate to
samples\app-localization\nodejs
cd samples/app-localization/nodejs
-
Install modules
npm install
-
Start the bot
npm start
In Teams, Once the app is successfully installed, you can interact with tab and bot in your preferred language.
To change the language in Microsoft Teams, please click your profile picture at the top of the app, then select Settings -> General and go to the Language section. Choose the preferred language and restart to apply the change. This sample supports en-US, fr-CA, hi-IN and es-MX.
Add Resource files for the respective languages, Check culture fallback behaviour and how to add other cultures refer Globalization and localization Fundamentals.