Plugin for Visual Studio Code

Integrate your Visual Studio Code projects with Crowdin to optimize the localization process. The plugin allows uploading source strings instantly to your Crowdin project, downloading source strings from Crowdin, and downloading completed translations.

Once you install the Crowdin plugin, the Crowdin Explorer will appear in the Visual Studio Code’s Activity Bar as a new component. The plugin scans each workspace for a Crowdin-specific configuration file and builds a tree with the source files. Use Crowdin Explorer to manage your localization resources and automate file synchronization. Also, you can track translation and proofreading progress for each project and target language.

Configuration

To work with the Crowdin plugin in the Visual Studio Code workspace, you need to create a Crowdin configuration file named crowdin.yml or crowdin.yaml.

Configuration file example:

"project_id": "projectId"        #open project and go to Integrations > API
"api_token": "apiToken"          #open profile settings and go to API > New Token > create Token
"base_path": "folder"  #optional
"branch": "master"  #optional

"files": [
  {
    "source": "/sources/**/*.xml",
    "translation": "/translations/%two_letters_code%/%original_file_name%",
    "update_option": "update_as_unapproved", #optional
    "excluded_target_languages": ["uk", "fr"], #optional
    "labels": ["android", "emails"] #optional
  },
  {
    "source": "multicolumn.csv",
    "translation": "multicolumn.csv",
    "scheme": "identifier,source_phrase,context,uk,ru,fr" #optional
  }
]

You also can use the environment variables in the configuration file.

Read more about Environment Variables.

Setup

Follow these steps to setup Crowdin Plugin for VS Code:

  1. Prepare a crowdin.yml or crowdin.yaml configuration file and add it to the needed workspace in Visual Studio Code.
  2. Install the Crowdin plugin using one of the following methods:
    • open VS Code Extensions (Ctrl+Shift+X), search for Crowdin, and click Install
      or
    • launch VS Code Quick Open (Ctrl+P), paste the below command, and press Enter
      ext install Crowdin.vscode-crowdin
      
  3. The Crowdin plugin scans each Visual Studio Code workspace to find a Crowdin configuration file (crowdin.yml or crowdin.yaml). It automatically builds the tree with source files in the Crowdin Explorer component available in your Activity Bar.
  4. Use upward and downward arrows in the Crowdin Explorer component to upload source files to Crowdin and download translations correspondingly.
    Crowdin Explorer

Extension Settings

This extension allows you to configure the following settings:

  • tms.autoRefresh – use this option to auto-refresh the file tree after each change in the Crowdin configuration file.

See Also

Was this article helpful?