🎉 v1.0

Get started

  • Welcome
  • Documentation
  • Pricing
    Soon

Tools

  • I18n MCP
  • CLI
  • CI/CD Integrations
  • Compiler
    Alpha
  • Connect Your Engine

Resources

  • Languages
  • LLM Models
  • Guides

Company

  • Enterprise
  • CareersHiring!
Dashboard

Continuous Localization

  • How it works
  • Setup
  • Advanced patterns

Platforms

  • GitHub
  • BitBucket
  • GitLab

GitLab CI/CD

Max PrilutskiyMax Prilutskiy·Updated 1 day ago·2 min read

The Lingo.dev GitLab integration runs the localization pipeline using the ci command inside the official Docker image. It commits translations directly or creates merge requests depending on your workflow.

Prerequisites

Complete the CI/CD Setup first. You need a working i18n.json and both LINGODOTDEV_API_KEY and GL_TOKEN stored as CI/CD variables.

Access tokens#

GitLab requires an access token for git operations in pipelines. Either a personal access token or project access token works:

  1. Select your avatar > Edit profile > Access tokens
  2. Click Add new token, name it (e.g., "Lingo.dev")
  3. Enable scopes: api, read_repository, write_repository
  4. Click Create personal access token

Store the token as a CI/CD variable named GL_TOKEN (Settings > CI/CD > Variables, select Masked).

Pipeline examples#

Commit to main#

yaml
image:
  name: lingodotdev/ci-action:latest
  entrypoint: [""]

stages: [translate]

translate:
  stage: translate
  script:
    - npx lingo.dev@latest ci --api-key "$LINGODOTDEV_API_KEY"
  only:
    - main

Merge request from main#

yaml
image:
  name: lingodotdev/ci-action:latest
  entrypoint: [""]

stages: [translate]

translate:
  stage: translate
  script:
    - npx lingo.dev@latest ci --pull-request --api-key "$LINGODOTDEV_API_KEY"
  only:
    - main

Commit to feature branch#

yaml
image:
  name: lingodotdev/ci-action:latest
  entrypoint: [""]

stages: [translate]

translate:
  stage: translate
  script:
    - npx lingo.dev@latest ci --api-key "$LINGODOTDEV_API_KEY"
  only:
    - branches
  except:
    - main

Merge request from feature branch#

yaml
image:
  name: lingodotdev/ci-action:latest
  entrypoint: [""]

stages: [translate]

translate:
  stage: translate
  script:
    - npx lingo.dev@latest ci --pull-request --api-key "$LINGODOTDEV_API_KEY"
  except:
    - main

Customization#

Override defaults using CLI flags:

bash
npx lingo.dev@latest ci --api-key "$LINGODOTDEV_API_KEY" --commit-message "chore: update translations"

Next Steps#

GitHub Actions
Set up GitHub Actions integration
Bitbucket Pipelines
Set up Bitbucket Pipelines integration
Advanced Patterns
Translation checks, merge conflicts, workflow selection
Connect Your Engine
Route CI/CD translations through your engine

Was this page helpful?