Integrate Localization into Your CI/CD Pipeline with the PTC API

Learn how to integrate the PTC API into your CI/CD pipeline to deliver human-quality AI translations as part of your build process.

Secure by design — no repository read or write access required.

Compatible with any CI/CD system, with ready-made configurations included.

Controlled access through project-specific API tokens.

Human-quality translations delivered in minutes, directly in your build.

How the CI/CD Integration Works

Before you set up PTC with your CI system, here are the three principles behind the PTC API and CLI:

1

Resource files are tied to a branch

Every file you send to PTC is linked to a branch name (e.g. main, feature/new-checkout). This keeps translations separate, so work from different features doesn’t overwrite each other.
When you use the ready-made CI/CD configurations, this mapping is already handled automatically.

2

Translations are processed asynchronously

PTC does not return translations immediately. Instead, it:

  • Prepares translated files for download
  • Uploads the updated files
  • Identifies only the new or modified strings
  • Translates the strings

3

One CLI script works everywhere

Instead of calling the API yourself, use the PTC CLI:

One script handles the entire flow (upload → poll → download). The CLI is hosted on GitHub but works on Linux, macOS, GitHub Actions, GitLab, Bitbucket, or any other CI/CD platform.

High-Level Flow: Set Up the PTC API in Your CI/CD Pipeline 

The free trial gives you unlimited access to all features. 

Step 2

Create a new project.

When choosing how to use PTC, select API integration.  During setup, you’ll provide a bit of context about your project (what it does, who it’s for) and select the languages you want to translate into.

Step 3

Get your API token.

At the end of the setup, you’ll receive a project-specific API token. Copy it and store it safely — you’ll need it to authenticate all requests. You can always find the same token again in your project dashboard under Settings → PTC API tokens.

Step 4

Add the PTC API token to your repository in the right location.

ProviderWhere to add the token
GitHub ActionsGo to Settings → Secrets and variables → Actions and add PTC_API_TOKEN. Then go to Settings → Actions → General and enable Workflow permissions so the workflow can create pull requests.
GitLab CI/CDGo to Settings → CI/CD → Variables and add PTC_API_TOKEN.
Bitbucket PipelinesGo to Repository settings → Pipelines → Repository variables and add PTC_API_TOKEN.

Step 5

Copy the ready-made CI/CD configuration.

You can get the ready-made CI/CD configuration for your platform from the PTC CLI wiki. These templates already include the steps to download and run the CLI.

Step 6

Run the workflow.

You can trigger the workflow manually, on commits that update resource files, or on a schedule. See triggers for GitHub, GitLab, and Bitbucket.

When it runs, the CLI uploads your files, waits for translations to finish, and writes the updated translations back into your repository. If you’re using the ready-made configs, the workflow will also create a pull/merge request with the changes, so you can review and merge them like any other code update. From here on, your translations stay in sync automatically.

CI/CD Examples

WordPress

Ruby on Rails

JSON Files (React Apps)

Why Use PTC for Software Translations?

PTC is a complete translation system for developers and product teams — built to keep your code, brand, and audience in sync.

Context-aware translations that protect your brand

Before translating, PTC learns about your product, your audience, and your terminology. That’s why 99.5% of sentences go live without edits, and 85% of projects don’t get edited at all.

How PTC’s AI translations protect your brand →

 Broad platform and file format support

PTC works with the most popular resource file formats and platforms, including:
Android, iOS, React, Vue.js, Angular, Ruby on Rails, JavaScript, Adobe Commerce (Magento), Shopify, and WordPress.

More about supported file formats →

Translate more than resource files

Need to translate release notes, emails, or documentation? PTC also includes a fast “Paste to translate” feature that gives you the same context-aware translations for text outside of code.

How to translate text outside of resource files →

Automate Translations in Your CI/CD

Set up PTC once, and your resource files and translations stay updated automatically in your CI/CD pipeline.

Scroll to Top