The Vs Code extension for Qtrans, A powerful developer tool for managing translations, automating language localization, and generating translations with AI for selected text.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Welcome to the QTrans VS Code Extension, a companion tool for the powerful qtrans library. This extension simplifies your translation management workflow directly within Visual Studio Code by leveraging the capabilities of the qtrans library.
Features
Localization Management: Streamline the process of managing language files.
Contextual Commands: Access translation tools directly from the context menu.
Keybindings: Use predefined shortcuts for quick operations.
Generate Translations: Automatically generate translations for selected text using AI.
Getting Started
1. Prerequisites
Ensure you have Node.js installed on your system.
Install the qtrans library, which powers the extension's functionality.
2. Initializing QTrans
Before using the extension, initialize your project for qtrans by running the following command in your terminal:
npx qtrans init
This will set up the necessary configuration files and structure for your translation management.
3. Installing the Extension
Open Visual Studio Code.
Go to the Extensions view (Ctrl+Shift+X or Cmd+Shift+X on macOS).
Search for "QTrans - AI Translation Manager."
Click Install.
4. Using the Extension
Generating Translations
Highlight the text you want to translate.
Right-click and select QTRANS: Generate translation for the selected text from the context menu.
Alternatively, use the shortcut Ctrl+Shift+T (or Cmd+Shift+T on macOS).
Loading QTrans Config
To load your qtrans configuration:
Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P on macOS).
Search for Load QTrans Config and select it.
Commands and Shortcuts
Command
Description
Shortcut
QTRANS: Generate Translations
Generate translations for the selected text
Ctrl+Shift+T
Load QTrans Config
Load the QTrans configuration file
Command Palette
Requirements
Node.js 14 or higher
A project initialized with qtrans (npx qtrans init)
Feedback and Contributions
We welcome your feedback and contributions! If you encounter any issues or have feature suggestions, please visit our GitHub repository.