GitLab Integration with PTC
Connect GitLab with PTC for continuous localization. Get translations delivered via automatic merge requests whenever your code changes.
How To Integrate GitLab with PTC
PTC connects to your GitLab repository and keeps your resource files translated as you work. Push changes to your code and PTC will automatically detect them, translate the updated strings, and open a merge request.
GitLab integration is a Pro feature. It becomes available when you activate Pay-As-You-Go.
Connect Your GitLab Repository
PTC supports both GitLab.com and self-hosted GitLab repositories. Depending on where you are in your workflow, there are two ways to get started:
- When creating a new project in PTC, select Git Integration in the setup wizard.
- To switch an existing project from manual file uploads to a continuous Git-based workflow, go to Settings → Merge Requests and click Add Git Integration.
In both cases, you’ll see a screen where you can enter the URL to your project within the repository. PTC will automatically detect that you’re using GitLab.

Authenticate with GitLab
To connect your repository, you can use an access token (recommended) or sign in with OAuth. PTC supports both project access tokens and group access tokens.
PTC requires webhook access to detect changes in your repository. When using an access token, the role and scopes you need depend on how you want the webhook to be set up:
| Automatic webhook setup | Manual webhook setup | |
|---|---|---|
| How it works | PTC creates and configures the webhook in GitLab on your behalf during the integration flow. | PTC provides you with a Callback URL and Secret Token. You create a webhook in your GitLab settings using these details, with Push events and Merge request events as triggers. |
| Creating the token | In your project, go to Settings → Access Tokens. Give the token a name, an optional description, and set an expiry date (recommended for security). | In your group, go to Settings → Access Tokens. Give the token a name, an optional description, and set an expiry date (recommended for security). |
| Required role | Maintainer | Developer (or equivalent) |
| Scopes | api → Allows PTC to read from and push to the repository |
read_repository + write_repository |
Store the token securely and add it to PTC. It will verify your permissions and let you choose which branches and resource files to monitor.
Access stays limited to the files PTC translates
PTC uses read access to detect changes in your resource files and write access to deliver translations via pull requests. PTC only interacts with the files it manages for translation and does not make changes to any other parts of your repository.
Webhooks keep translations in sync automatically
Webhooks are how PTC gets notified when you push changes to your repository, so it can retranslate affected strings automatically. Without webhook access, PTC cannot monitor your branches for updates.
Translate Your Project with PTC
Once your GitLab repository is connected, continue through the setup steps to provide some context about your app or software and choose your target languages.
PTC will then translate the resource files in your connected GitLab branch. If your repository already contains translation files, PTC can detect and reuse them.
Review the Merge Request with Translations
PTC translates in minutes and sends a merge request with translations directly to your GitLab repo. Once you’re ready, simply merge it — no other action needed.
From that point on, as you push changes to your code, PTC will detect them and send new merge requests with updated translations, keeping your software fully localized over time.
Generate New Merge Requests Manually
In addition to automatic updates, you can generate a new merge request at any time to sync translations you’ve edited or retranslated.
To do this, go to the Translations tab. From here, you can review translated text that exceeds the length limit and either edit it manually or let PTC generate a shorter version. Once you’re done, click Generate MR to push the updated translations to your repository.

Give PTC Access to New Resource Files as You Add Them
If you add new resource files to your repository after the initial integration, you can ask PTC to check for them.
- Go to Settings → Monitored Files and click Rescan your repository. PTC will scan your repository and display any newly discovered files as drafts.
- Click the + icon next to a file to include it for translation, then click Save with translation to confirm.

To skip manual review entirely, select the Automatically include new translation files checkbox. From that point on, PTC will automatically pick up and monitor any new resource files it finds, without requiring you to confirm them.

To adjust other settings like monitored branches and languages, navigate through the Branch Management, Monitored Files, and Languages tabs.
Why Localize GitLab Projects with PTC
Automated File Translation
PTC automatically detects and translates your resource files, delivering translations via merge requests. You maintain control by using the GitLab workflow you already know and trust — and without the need to create any script.
Less Manual Work
PTC saves development time and speeds up releases by monitoring your repository and updating translation files as you push changes.
Improved Translation Accuracy
PTC eliminates the risk of human errors like misplaced keys or outdated translations. You get highly accurate and on-brand translations.
Localization keeps pace with software and mobile development
PTC is designed for teams building software products and mobile apps who want localization to keep pace with development. Once you connect your GitLab repository, PTC automatically detects new and updated strings and delivers translations back through a merge request, with no manual handoff required.
Common formats in software and mobile projects — like PO files and JSON files — are fully supported. For more on how PTC fits into these workflows, see our software localization and mobile app localization pages.
Connect GitLab at no extra cost
There’s no additional charge for connecting GitLab. Rather than a subscription model, PTC uses simple Pay-As-You-Go pricing: you’re only charged for the words you translate, and the first 500 words each month are free. Full details are on the PTC pricing page.
Works with GitHub and Bitbucket too
In addition to GitLab, PTC integrates with GitHub and Bitbucket, offering the same automated localization workflows and features for each platform.