Azure Pipelines Free
ByAndrii BodnarVerified Author

Automate your frequent localization tasks such as uploading source files and downloading translations.

Try Crowdin

Use the Crowdin CLI to automate localization in Azure Pipelines

Copy link

Use Azure Pipelines with Crowdin CLI to automate your frequent localization tasks such as uploading source files, downloading translations or anything else you can do with Crowdin CLI.

Azure Pipelines can be connected with Crowdin through the Crowdin CLI.

Example pipeline configuration:

trigger:
  branches:
    include:
      - refs/heads/*
  paths:
    include:
      - locales/en/*.json
 
variables:
  BRANCH_NAME: $[replace(variables['Build.SourceBranch'], 'refs/heads/', '')]
 
jobs:
  - job: Crowdin
    pool:
      vmImage: ubuntu-latest
    steps:
      - task: NodeTool@0
        displayName: 'Install Node.js'
        inputs:
          versionSpec: '16.x'

      - script: npm install -g @crowdin/cli

      - script: |
          crowdin push --no-progress -b $(BRANCH_NAME) \
                       -T $(CROWDIN_TOKEN) \
                       -i $(PROJECT_ID) \
                       -s "locales/en/*json" \
                       -t "locales/%two_letters_code%/%original_file_name%" \
                       /

In this example, the pipeline will be triggered on branch push filtering by file path. Then you need to set up Node and install Crowdin CLI NPM package globally. After the CLI installation, you can execute any CLI command.

Use your Crowdin Project ID, and access token, and specify source and translation files. To securely store your Crowdin Personal Access Token and Project ID, you need to configure it as a Secret Variables in your pipeline.

More information about Crowdin CLI commands.

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 Enterprise
  • crowdin.com
Details

Released on Feb 7, 2023

Updated on Jul 10, 2024

Published by Andrii Bodnar

Identifier:azure-pipelines