- Install the extension.
- Configure
apikey
andapiurl
in user settings configuration -openaiTranslate.apiKey
openaiTranslate.apiURL
. - Configure desired 'translate to' language/s in user settings configuration -
openaiTranslate.languages
.
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.
- Multi Languages:
Translate your code to multi languages simply by adding the desired language code toopenaiTranslate.languages
string array configuration.(You can add any language supported by ChatGPT) - Replace Text:
Replace selected text with translated text by configuringopenaiTranslate.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!