Skip to content

A tool to improve the efficiency of the translation, especially for the localization of Docs.

License

Notifications You must be signed in to change notification settings

yanxiaodi/vscode-translator-helper

Repository files navigation

translator-helper README

Build Status Current Version Install Count Ratings

translator-helper is a VS Code Extension to simplify the translation of documents, especially for the localization of Docs.

Features

Google translate API supported. For Chinese users, you can update the settings to use GoogleCN service.

  • Translate and Insert. Alt+T. It is very useful when you localize the docs. Click any position in the paragraph, then press Alt+T. The whole paragraph will be translated then inserted after the original text.

Translate and Insert

  • Reverse Translate and Insert: Shift+Alt+T. Translate the text from the target language to the source language.

  • Select and Hover Translate. You can select a word or a sentence, hover the mouse over the text, then the text will be translated in a popup. You can click Copy to copy the translated text.

Selection and Hover Translation

  • Translate: Ctrl+T. Select a word or a sentence, then press Ctrl+T. The translated text will be shown on the status bar. The text will be automatically copied to the clipboard.

Translate

Extension Settings

You can change the User Settings to specify the API and the languages you need to translate.

This extension contributes the following settings:

  • translatorHelper.api: Specify the translate API. Options: google, google-cn.
  • translatorHelper.sourceLanguage: The source language code. The default value is en.
  • translatorHelper.targetLanguage: The target language code. The default value is zh-CN.
  • translatorHelper.enableSelectionHoverTranslation: Whether to enable selection and hover translation. The default value is true.

The source and target languages are identified using the iso-639-1 codes. For example, the source language is English (en) and the target language is Chinese-Simplified (zh-CN). You can find all the supported languages here: Language support

Settings

Known Issues

The keybinding might not work properly on some linux machines. Please open issues to describe your environment. Thanks.

Release Note

Please see Changelog

For more information

Enjoy!