> ## Documentation Index
> Fetch the complete documentation index at: https://www.activepieces.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Piece i18n

> Learn about translating pieces to multiple locales

**1. Generate**

Run the following command to create a translation file with all the strings that need translation in your piece

```bash theme={null}
npm run cli pieces generate-translation-file PIECE_FOLDER_NAME
```

**2. Translate**

Make a copy of `packages/pieces/<community_or_custom>/<your_piece>/src/i18n/translation.json`, name it `<locale>.json` i.e fr.json and translate the values.

> [!TIP]
>
> For open source pieces, you can use the [Crowdin project](https://crowdin.com/project/activepieces) to translate to different languages. These translations will automatically sync back to your code.

**3. Test Locally**

After following the steps to [setup your development environment](https://www.activepieces.com/docs/build-pieces/building-pieces/development-setup.md), click the small cog icon next to the logo in your dashboard and change the locale.

![Locales](https://mintcdn.com/activepieces/ki8mFooo8mAmhMdP/resources/i18n-pieces.png?fit=max\&auto=format\&n=ki8mFooo8mAmhMdP\&q=85\&s=47b264ac0f3dd11a4ddac55c8b2d0cea)

In the builder your piece will now appear in the translated language:

![French Webhooks](https://mintcdn.com/activepieces/ki8mFooo8mAmhMdP/resources/french-webhooks.png?fit=max\&auto=format\&n=ki8mFooo8mAmhMdP\&q=85\&s=ac22fe9c3ecfb574f9f36bb63605e2e6)

**4. Publish**

Follow the docs here to [publish your piece](https://www.activepieces.com/docs/build-pieces/sharing-pieces/overview.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.