Installing
The Quetzal Extension is available from the VSCode Marketplace. It can be searched from the extensions panel within VSCode and Cursor.Configuration
Verify that the extension’s settings match your project. Open VSCode/Cursor settings and search for Quetzal Most importantly, be sure to setQuetzal: Translation Library
to the library you are using for your project.
Usage
The Quetzal extension is designed to automatically writet
functions in your JavaScript codebase.
It adds four commands to your VSCode/Cursor Command Palette (Command
+ Shift
+ P
to open):
Quetzal: Scan for User-Facing Strings
Quetzal: Scan Current Document
Quetzal: Wrap Strings
Quetzal: Stop Scanning
Example: Simple Next.js Component
Suppose you have the following file open in VSCode/Cursor:login.tsx
Run a Scan
First runQuetzal: Scan Current Document
(Command
+ Shift
+ P
to open the command palette)
Your editor should then look something like this:

Translate this string
Conversely, if something is green but should not be translated it, hover over it and click Do not translate this string
Wrap Strings
Then, once everything looks correct, clickQuetzal: Wrap Strings
in the top right of your code editor.
Your file should now look like this:
login.tsx
t
function, and the proper t
function was imported for this client-side component.
And you’re done!
This file is now marked, and Quetzal will find and translate the text shown.What if I have a lot of files?
If you have a lot of files which have not been integrated with Quetzal, runQuetzal: Scan for User-Facing Strings
(Command
+ Shift
+ P
to open the command palette)
This will open a menu to scan several folders of your project at once, and sort all files by the number of strings that likely need to be translated.
This should allow you to rapidly integrate, even in a large codebase.