GitHub Crowdin Action Free
ByCrowdinVerified Author

A GitHub action to manage and synchronize localization resources with your Crowdin project

Try Crowdin

Synchronize localization with GitHub Crowdin Action

Copy link

What does this action do?

Copy link
  • Uploads sources to Crowdin.
  • Uploads translations to Crowdin.
  • Downloads translations from Crowdin.
  • Creates a PR with the translations.

Getting started with Crowdin Action

Copy link

Usage

Copy link

Set up a workflow in .github/workflows/crowdin.yml (or add a job to your existing workflows).

Read the Configuring a workflow article for more details on how to create and set up custom workflows.

name: Crowdin Action

on:
  push:
    branches: [ main ]

jobs:
  synchronize-with-crowdin:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v4

    - name: Crowdin action
      uses: crowdin/github-action@v1
      with:
        upload_sources: true
        download_translations: true
      env:
        GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
        CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
        CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

Supported options

Copy link

The default action is to upload sources. Though, you can set different actions through the “with” options. If you don't want to upload your sources to Crowdin, just set the upload_sources option to false.

By default sources and translations are being uploaded to the root of your Crowdin project. Still, if you use branches, you can set the preferred source branch.

You can also specify what GitHub branch you’d like to download your translations to (default translation branch is l10n_crowdin_action).

In case you don’t want to download translations from Crowdin (download_translations: false), localization_branch_name and create_pull_request options aren't required either.

For more detailed list of supported options, see the action.yml.

Crowdin configuration file

Copy link

If your workflow file specifies the config property, you'll need to add the following to your Crowdin configuration file (e.g. crowdin.yml):

project_id_env: CROWDIN_PROJECT_ID
api_token_env: CROWDIN_PERSONAL_TOKEN

When the workflow runs, the real values of your token and project ID will be injected into the config using the secrets in the environment.

Contributing

Copy link

If you would like to contribute, please read the Contributing guidelines.

Seeking Assistance

Copy link

If you find any problems or would like to suggest a feature, please feel free to file an issue on GitHub at Issues Page.

Localize your product with Crowdin

Automate content updates, boost team collaboration, and reach new markets faster.

Crowdin is a platform that helps you manage and translate content into different languages. Integrate Crowdin with your repo, CMS, or other systems. Source content is always up to date for your translators, and translated content is returned automatically.

Learn More
Categories
Development
Works with
  • crowdin.com
  • Crowdin Enterprise
Details

Released on Apr 4, 2022

Updated on Jul 12, 2024

Published by Crowdin

Identifier:github-action