translator-comments READMEtranslator-comments is a VS Code extension for translating comments in program files like ".py",".c",".cpp",".cs", ".ts", ".js", ". json" Featurestranslator-comments Translates all comments in the target file at once. Note that in Python files, a string comments is considered a string variable with no identifier. The extension requires the Google translate API to work. Translation can be done between any languages supported by the Google translate API. Get a Google translation API key (https://console.cloud.google.com/) or use the one you already got. The translator can be configured to translate single-line comments only, or single-line and multi-line comments. Individual comments can also be marked as untranslatable. For this, in the body of the comment, you need to put the marker "~~~" in any place. " It is possible to include automatic determination of the need for translation. That is, if the source is listed as "en" and in the comment, most of the letters are not English, the translation will not be performed.In addition, if the source is not specified as "en" and in the comment, most of the letters are English, the translation will not be performed. This is good for reducing the amount of translation." Extension SettingsYou can change the User Settings to specify the API and the languages you need to translate. This extension contributes the following settings:
Known IssuesThe keybinding might not work properly on some linux machines. Enjoy! |