Korean English Translator
한국어 | English
한국어
VS Code 에디터에서 선택한 한국어 또는 영어 텍스트를 DeepL API로 번역하는 확장 프로그램입니다.
선택한 텍스트의 언어를 자동으로 판별하여 다음 방향으로 번역합니다.
영어 → 한국어
한국어 → 영어(미국)
번역 결과는 원문을 바꾸지 않고 VS Code 알림으로 표시됩니다.
주요 기능
- 선택한 텍스트의 한국어·영어 자동 판별
- 에디터 우클릭 메뉴를 통한 번역
Ctrl+Alt+T 단축키를 통한 번역
- DeepL API Free 및 Pro 계정 지원
- API 키를 VS Code SecretStorage에 저장
- 한국어와 영어가 섞인 텍스트를 API 요청 전에 차단
- 네트워크 요청이 15초를 넘으면 자동으로 중단
준비 사항
이 확장 프로그램을 사용하려면 사용자의 개인 DeepL API 키와 인터넷 연결이 필요합니다.
- DeepL API 계정을 만듭니다.
- DeepL 계정에서 API 키를 확인합니다.
- VS Code에서
Ctrl+Shift+P를 눌러 명령 팔레트를 엽니다.
- Translator: Set DeepL API Key를 실행합니다.
- 개인 API 키를 입력합니다.
API 키 끝에 :fx가 붙은 DeepL API Free 키는 무료 API 주소를 사용하고, 그 외의 키는 DeepL API Pro 주소를 사용합니다.
입력한 API 키는 소스 코드나 일반 설정 파일이 아닌 VS Code SecretStorage에 저장됩니다.
사용 방법
우클릭 메뉴
- 에디터에서 번역할 한국어 또는 영어 텍스트를 선택합니다.
- 선택 영역을 우클릭합니다.
- Translate Selected Text를 선택합니다.
- 번역 결과를 VS Code 알림에서 확인합니다.
단축키
번역할 텍스트를 선택한 후 다음 단축키를 누릅니다.
Ctrl+Alt+T
단축키를 변경하려면 VS Code의 Keyboard Shortcuts에서 Translate Selected Text를 검색하여 원하는 키를 지정할 수 있습니다.
언어 판별 방식
선택한 텍스트에 한국어 문자가 있으면 영어로, 영문 알파벳이 있으면 한국어로 번역합니다. 숫자, 공백, 문장 부호는 언어 판별에서 제외됩니다.
다음과 같이 한국어와 영어 알파벳이 함께 포함된 텍스트는 지원하지 않습니다.
오늘 meeting이 있습니다.
이 경우 DeepL에 요청을 보내지 않고 오류 메시지를 표시합니다. 한국어와 영어 문자가 하나도 없는 텍스트도 번역하지 않습니다.
API 키 변경
저장된 API 키를 변경하려면 명령 팔레트에서 Translator: Set DeepL API Key를 다시 실행하고 새 키를 입력합니다.
개인정보 및 API 사용 안내
- 번역을 실행하면 사용자가 선택한 텍스트가 DeepL API로 전송됩니다.
- 이 확장 프로그램은 번역할 텍스트를 별도로 저장하지 않습니다.
- DeepL API 사용량과 요금은 사용자의 DeepL 계정 정책을 따릅니다.
- 비밀번호, API 키, 개인정보 또는 외부에 공개하면 안 되는 소스 코드는 번역하지 마세요.
알려진 제한 사항
- 한국어와 영어가 섞인 텍스트는 번역할 수 없습니다.
- 번역 결과는 알림으로만 표시되며 선택한 원문을 교체하지 않습니다.
- DeepL API 키와 인터넷 연결이 필요합니다.
- 네트워크 또는 DeepL API 응답이 15초를 넘으면 요청이 취소됩니다.
개발
의존성 설치:
npm.cmd install
TypeScript 컴파일:
npm.cmd run compile
코드 검사:
npm.cmd run lint
확장 프로그램을 개발 모드로 실행하려면 VS Code에서 F5를 누르고 Extension Development Host 창을 사용합니다.
VSIX 패키지 생성:
vsce.cmd package
버전
0.0.1
- 한국어 및 영어 자동 판별
- DeepL API Free 및 Pro 번역
- 우클릭 메뉴와 단축키 지원
- VS Code SecretStorage를 이용한 API 키 저장
- 혼합 언어 검사 및 15초 네트워크 시간 제한
English
A VS Code extension that translates selected Korean or English text using the DeepL API.
The extension automatically detects the language of the selected text and translates it in the following direction:
English → Korean
Korean → English (US)
The translation appears in a VS Code notification without replacing the original text.
Features
- Automatically detects Korean or English text
- Translates from the editor context menu
- Translates with the
Ctrl+Alt+T keyboard shortcut
- Supports DeepL API Free and Pro accounts
- Stores the API key in VS Code SecretStorage
- Blocks mixed Korean and English text before making an API request
- Cancels network requests that take longer than 15 seconds
Requirements
You need your own DeepL API key and an internet connection.
- Create a DeepL API account.
- Find the API key in your DeepL account.
- Press
Ctrl+Shift+P in VS Code to open the Command Palette.
- Run Translator: Set DeepL API Key.
- Enter your personal API key.
DeepL API Free keys ending in :fx use the free API endpoint. Other keys use the DeepL API Pro endpoint.
The extension stores your API key in VS Code SecretStorage, not in the source code or a regular settings file.
Usage
- Select Korean or English text in the editor.
- Right-click the selected text.
- Select Translate Selected Text.
- Read the translation in the VS Code notification.
Keyboard shortcut
Select the text to translate and press:
Ctrl+Alt+T
To customize the shortcut, open VS Code Keyboard Shortcuts, search for Translate Selected Text, and assign your preferred key combination.
Language detection
If the selected text contains Korean characters, the extension translates it into English. If it contains English letters, the extension translates it into Korean. Numbers, spaces, and punctuation are ignored during language detection.
Mixed Korean and English text is not supported. For example:
오늘 meeting이 있습니다.
In this case, the extension displays an error without sending a request to DeepL. Text containing neither Korean nor English characters is also rejected.
Changing the API key
To replace the saved API key, open the Command Palette and run Translator: Set DeepL API Key again.
Privacy and API usage
- Selected text is sent to the DeepL API when you start a translation.
- This extension does not separately store the selected text.
- DeepL API usage and charges depend on your DeepL account.
- Do not translate passwords, API keys, personal information, or confidential source code.
Known limitations
- Mixed Korean and English text cannot be translated.
- Translations appear only in notifications and do not replace the selected text.
- A DeepL API key and internet connection are required.
- Requests are cancelled if DeepL does not respond within 15 seconds.
Development
Install dependencies:
npm.cmd install
Compile TypeScript:
npm.cmd run compile
Run lint:
npm.cmd run lint
Press F5 in VS Code to launch the extension in an Extension Development Host window.
Create a VSIX package:
vsce.cmd package
Version
0.0.1
- Automatic Korean and English detection
- DeepL API Free and Pro translation
- Context-menu and keyboard-shortcut support
- API key storage using VS Code SecretStorage
- Mixed-language validation and a 15-second network timeout