CLI

Languine provides a CLI to help you translate your application.


Commands Overview

Translate

The translate command is used to translate your application.

Terminal
npx languine@latest translate

Init

The init command is used to initialize a new Languine project.

Terminal
npx languine@latest init

Auth

The auth command is used to authenticate with Languine.

Terminal
npx languine@latest auth

Sync

The sync command is used to sync your application with Languine.

Terminal
npx languine@latest sync

Locale Add

The locale command is used to manage your application's locales.

Terminal
npx languine@latest locale add pt,fr

Locale Remove

The locale remove command is used to remove a locale from your application.

Terminal
npx languine@latest locale remove pt,fr

Overrides

The overrides command is used to manage translation overrides in your application saved in languine.ai. Overrides allow you to customize specific translations from the Languine Dashboard.

The overrides pull command is used to pull the latest overrides from the Languine Dashboard

Terminal
npx languine@latest overrides pull

Overrides for source locale

Sometimes you may want to get overrides for the source locale. For example, as a developer you might add translations in en.json but want to have spell checks, overrides and maintain consistent tone with other languages. You can enable this by adding your source locale to the target locales as follows:

languine.json
{
  "locale": {
    "source": "en",
    "targets": [
      "sv",
      "en" <- Add your source locale here
    ]
  },
  "files": {
    "json": {
      "include": [
        "src/locales/[locale]/*.json"
      ]
    }
  }
}


Delete translations

The translations delete command is used to delete all target translation files and remote translations from your project. This is useful when you want to start fresh or remove all translations.

Terminal
npx languine@latest translations delete