Translator for Command Palette is a translation extension for Windows Command Palette designed to streamline text translation directly within the Command Palette interface. It allows users to input text, switch translation sources, and copy results seamlessly without leaving the workflow.
Key Features:
Integrated Translation Workflow: Directly access translation services from the Command Palette with a top-level Translator command.
Multiple Translation Providers: Supports Bing, Google, and Aliyun translation services with customizable default settings.
Language Customization: Configure preferred target languages, enable automatic source language detection, and override translations using syntax like text >> languageCode.
Efficient Query Handling: Uses delayed updates to avoid unnecessary translation requests on every keystroke.
Target Audience and Benefits:
Ideal for Windows users who frequently need text translation in their workflow. This tool simplifies the process of translating text, switching languages, and accessing translation results without navigating away from the Command Palette interface. It is particularly beneficial for developers, content creators, and professionals working across multiple languages.
The application is available via Winget Search Optimization: Install Translator for Command Palette via winget or deploy using the winget command line to streamline your automated workflow setup.
Translator for Command Palette is a translation extension for Windows Command Palette. It brings translation, language selection, copying results, and opening the original translation website into a single Command Palette workflow.
The project has been upgraded to .NET 10. The main app is packaged as an MSIX Command Palette extension and supports win-x64 and win-arm64 releases.
Screenshots
Features
Integrates with Windows Command Palette and provides a top-level Translator command.
Includes three translation providers, Bing, Google, and Aliyun, with Bing as the default.
Lets you choose the default translation source from Preferred provider in the extension settings.
Supports automatic source-language detection, with Traditional Chinese zht as the default target language.
Lets you search, select, and save the default target language from the Target language page.
Supports the text >> languageCode query syntax to override the target language for a single translation.
Lets you customize the query operator from Translate operator in the extension settings, for example by changing it to =>.
Translation results can be copied directly. More actions can also copy the original text or open the Bing / Google / Aliyun Translate webpage.
The Google provider also shows Dictionary items when dictionary data is included in the response.
Includes a built-in Supported Languages page for browsing language codes and copying example queries.
Translation input uses a short delayed update to avoid sending a request on every keystroke.
Usage
After installation, open Windows Command Palette, then search for and run Translator.
Enter text directly to translate it:
hello world
When no target language is specified, the configured Target language is used. The initial default is Traditional Chinese zht.
To specify the target language for a single translation, use the default operator >>:
hello world >> ja
open source software >> fr
今天天氣很好 >> en
If you change Translate operator to => in settings, queries will use that operator instead:
hello world => ja
Blank or invalid custom operators fall back to the default value, >>.
Settings
Command Palette extension settings currently provide three options:
Preferred provider: Choose the default translation provider. Available options are Bing, Google, and Aliyun.
Translate operator: Set the operator used in queries to override the target language. The default is >>.
Display language: Choose the language used for the extension's interface.
The Target language item on the translation page opens the language settings page. The selected language is saved immediately. Settings are written locally to:
%LOCALAPPDATA%\CmdPalTranslator\settings.json
The settings file stores:
targetLanguageId
preferredProviderId
translateOperator
displayLanguageId
If the settings file does not exist, has invalid contents, uses an unknown target language, or sets the target language to auto, the project falls back to its built-in defaults.
Supported Languages
The currently built-in language codes are:
Code
Language
en
English
zht
Chinese (Traditional)
zhs
Chinese (Simplified)
ja
Japanese
ko
Korean
fr
French
de
German
es
Spanish
it
Italian
ru
Russian
ar
Arabic
he
Hebrew
pt
Portuguese
th
Thai
LanguageCatalog maps the internal language codes to the provider codes required by Bing, Google, and Aliyun. For example, Traditional Chinese uses zh-TW in Google, zh-Hant in Bing, and zh-tw in Aliyun.
dotnet test src/CmdPalTranslator.Tests/CmdPalTranslator.Tests.csproj --filter TestCategory=Unit
Run live integration tests:
dotnet test src/CmdPalTranslator.Tests/CmdPalTranslator.Tests.csproj --filter TestCategory=Integration
Integration tests call the live Bing, Google, and Aliyun online translation endpoints. They are useful when verifying network access and provider behavior.
Before building, scale-specific icons are automatically copied to the base filenames required by Store / MSIX validation.
Adding a Display Language
The extension stores all UI strings in JSON files under src/CmdPalTranslator/Localization/. At startup, LocalizationService scans that directory and discovers every *.json file automatically. Adding a new display language therefore requires only one step.
Create a new JSON string file
Add a file named .json in src/CmdPalTranslator/Localization/ (for example, ja-JP.json). The file must contain a _meta.displayName key with the native name of the language, plus every UI key translated from en-US.json.
Keep all {0}, {1} format placeholders exactly as they appear in en-US.json; they are replaced at runtime with context-specific values.
On the next startup, LocalizationService reads _meta.displayName from every JSON file in the directory and builds SupportedLanguages from those entries. The Display language dropdown in the settings panel is then populated from that list automatically — no code changes are needed.
Publishing
You can publish to Microsoft Store through Microsoft Partner Center, or submit to WinGet. See the official documentation for the Command Palette extension packaging and publishing workflow: