Skip to content

Latest commit

 

History

History
39 lines (32 loc) · 1.88 KB

README.md

File metadata and controls

39 lines (32 loc) · 1.88 KB



OpenAI Translate

Translate your code using OpenAI API.

version

Installation

  1. Install the extension.
  2. Configure apikey and apiurl in user settings configuration - openaiTranslate.apiKey openaiTranslate.apiURL.
  3. Configure desired 'translate to' language/s in user settings configuration - openaiTranslate.languages.

config

How to use

Select the text that your want to translate and execute Translate command.

Tip: Use the shortcut Ctrl+Alt+t to translate the selected text.

Select the code that your want to comment and execute Comment command.

Tip: Use the shortcut Ctrl+Alt+c to translate the selected text.

Select the code that your want to complete and execute Complete command.

Tip: Use the shortcut Ctrl+Alt+f to translate the selected text.

Features

  • Multi Languages:
    Translate your code to multi languages simply by adding the desired language code to openaiTranslate.languages string array configuration.(You can add any language supported by ChatGPT)
  • Replace Text:
    Replace selected text with translated text by configuring openaiTranslate.replaceText to 'true'.
  • Multi Cursor:
    Translate/Replace selected text in each selected cursor's text.
  • Multiline:
    When selected text is multiline, each line will be translate separately.

Enjoy!