Skip to content

Latest commit

 

History

History
 
 
page_type description urlFragment products languages extensions contentType createdDate
sample
Microsoft Teams app localization using Bot and Tab
teams-app-localization-nodejs
office-teams
office
office-365
nodejs
samples
07-07-2021 13:38:25

Teams App Localization

This sample illustrates how to implement Localization for Microsoft Teams apps.

Prerequisites

  • Node.js version 10.14 or higher

    # determine node version
    node --version

To try this sample

  • 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

Interacting with the app in Teams

In Teams, Once the app is successfully installed, you can interact with tab and bot in your preferred language.

To change language in Teams

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.

  1. Installation: You should see your app installation screen content in selected language. image

  2. Bot: send any message to see localized image

  3. Tab: click on tab to see localized info.
    image

To Add more languages for localization in Teams through Code.

Add Resource files for the respective languages, Check culture fallback behaviour and how to add other cultures refer Globalization and localization Fundamentals.