Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Quick Translate HotkeyNew to Visual Studio Code? Get it now.
Quick Translate Hotkey

Quick Translate Hotkey

Štefan Varga

|
1 install
| (0) | Free
One shortcut to translate: selected text into your language, or type in your language and get the translation.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Quick Translate Hotkey

One shortcut for translating in VS Code. Select text and press Alt+Q to see it in your language. With nothing selected, Alt+Q asks you to type in your language and pastes the translation where you were typing.

It also works in the Claude Code chat panel and other webview panels, not only in the text editor.

⚠️ Important: this extension requires your own Google Cloud Translation API key. It does not translate anything until you add one. The key is free to create, but Google requires a billing account (the first 500,000 characters each month are free). See Get a Google API key.

The two languages are set by quickTranslateHotkey.from (the language of text you select) and quickTranslateHotkey.to (your language). The defaults are English (en) and Slovak (sk). Change them to any language codes Google Translate supports.

Requirements

  • VS Code 1.82 or newer.
  • A Google Cloud Translation API key. The extension uses the official Google Cloud Translation API and does nothing until a key is set. See Get a Google API key.
  • Internet access to translation.googleapis.com. Firewalls or proxies sometimes block it.

Privacy

  • The text you translate is sent to the Google Cloud Translation API, under your own Google Cloud project and its terms. That is the only connection the extension makes.
  • Text is sent only when you press Alt+Q (or run the command): the selection or the text you typed, nothing else from your files.
  • The extension has no telemetry and keeps no history. Your API key stays in VS Code's secure storage and is sent only to Google.
  • The extension uses the clipboard only while translating: to read a selection in a panel, to paste typed translations, and for the Copy button (see Usage). It doesn't read the clipboard at any other time.

Get a Google API key

  1. Open the Google Cloud Console and create a project (or pick an existing one).
  2. Link a billing account to the project. Google requires one even for the free tier. The first 500,000 characters each month are free; after that it costs about $20 per million characters.
  3. Under APIs & Services → Library, find Cloud Translation API and click Enable.
  4. Under APIs & Services → Credentials, click Create credentials → API key and copy the key.
  5. Click the new key and, under API restrictions, choose Restrict key → Cloud Translation API → Save. A restricted key can't be misused for other Google services if it leaks.
  6. In VS Code, open the Command Palette (Ctrl+Shift+P), run Quick Translate Hotkey: Set Google API Key and paste the key. (If you press Alt+Q without a key, a Set API Key button takes you there too.)

Optional: under Billing → Budgets & alerts, create a small budget (for example €1) to get an email if usage ever gets close to costing money. A budget only sends alerts; it doesn't stop usage.

The key is kept in VS Code's secret storage, encrypted by your operating system, not in settings.json. It isn't synced by Settings Sync and can't end up in a project's .vscode/settings.json, so set it on each computer. To change or remove it, run the same command again; leave the box empty to remove the key.

Usage

When you press Alt+Q What happens
Text is selected in the editor The selection is translated from from into to. The selected (original) text is also copied to the clipboard.
Text is selected in the Claude panel (or another panel) The selection is translated from from into to. The selected text is also copied to the clipboard (that's how the extension reads it).
Nothing is selected An input box opens. Type in your language (to) and press Enter. The translation into from is pasted where you were typing (editor, Claude chat box or another input), as if you pressed Ctrl+V. It also stays on the clipboard.

The same command is in the Command Palette as Quick Translate Hotkey: Translate Selection or Typed Text. From there, typed text is only copied to the clipboard, not pasted.

The translation appears as a VS Code notification. It hides after about 10 seconds, but stays open while your mouse is over it. Recent translations are also kept in the notification list (the bell icon in the bottom-right corner). When a translation isn't already on the clipboard, the notification has a Copy button.

Settings

Open Settings (Ctrl+,) and search for "Quick Translate Hotkey". The API key is not a setting; see Get a Google API key.

Setting Default What it does
quickTranslateHotkey.provider google Which service translates. Only Google Cloud Translation for now.
quickTranslateHotkey.from en Language of the text you select. Typed text is translated into it. Use auto to let Google detect the language of selected text; typing text then needs a real code here.
quickTranslateHotkey.to sk Your language. Selected text is translated into it, and the input box expects text in it.

Install

  1. In VS Code, open Extensions (Ctrl+Shift+X), search for Quick Translate Hotkey and click Install. Or run code --install-extension svarga91.quick-translate-hotkey.
  2. Add your API key with Quick Translate Hotkey: Set Google API Key (see Get a Google API key).

Updates install automatically. Settings Sync installs the extension on your other computers, but not the API key; set it on each computer.

From a .vsix file instead: open Extensions → ⋯ menu → Install from VSIX… and choose the file (named like quick-translate-hotkey-<version>.vsix), or run code --install-extension quick-translate-hotkey-<version>.vsix. A .vsix install doesn't update automatically and isn't installed on your other computers by Settings Sync.

Changing the shortcut

Alt+Q isn't used by VS Code or by common extensions. To pick another key, open Keyboard Shortcuts (Ctrl+K Ctrl+S), search for quickTranslateHotkey.show and change all three entries. There are three because each one covers a different case: editor with a selection, editor without one, and panels.

Known limitations

  • In the Claude panel, the extension asks VS Code to copy the selection. If a panel doesn't allow that, Alt+Q opens the input box instead. Copy the text with Ctrl+C and paste it into the box.
  • Pasting the typed translation into the Claude chat box depends on VS Code's Paste command working there. If it doesn't, the translation is still on the clipboard; press Ctrl+V.
  • At most 5,000 characters are translated at a time. Longer text is refused with a message, so a whole file selected by mistake isn't sent to Google (or billed).

Feedback

Found a bug or have an idea? Open an issue on GitHub.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft