From zero to a working module in 3 steps.
node packages/create-qt-module/index.js
Interactive prompt:
đ§Š QuickTranslate Module Scaffold
Select module type:
1. Translation Engine
2. Interaction Mode
...
Number (1-6): 1
Module name: Echo Translator
Author: myname
Short description: Demo module for testing
Output: translator-echo-translator.qt-module
Open the generated .qt-module file, find translate() and implement your logic:
// Before
async translate(text, from, to) {
throw new Error('translate() not implemented')
}
// After â DeepL API example
async translate(text, from, to) {
const resp = await fetch('https://api.deepl.com/v2/translate', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'DeepL-Auth-Key ' + apiKey
},
body: JSON.stringify({
text: [text],
source_lang: from.toUpperCase(),
target_lang: to.toUpperCase()
})
})
const data = await resp.json()
return data.translations[0].text
}
1. Open QuickTranslate â click đ§Š Modules
2. Click đĨ Import Module
3. Select your .qt-module file
4. Confirm â Module appears in the list, toggle ON
Use the existing demo module:
echo-translator.qt-module
After importing, it prepends a prefix to translated text. You can change the prefix in âī¸ settings.
Check manifest is complete:
| Field | Type | Description |
id | string | Lowercase alphanumeric with hyphens: engine-mymod |
name | string | Use English name |
version | string | x.y.z format |
type | string | translator / mode / renderer / processor / service / theme |
onActivate subscribes to translate:texttarget filter: if (req.target && req.target !== 'engine-xxx') returnoptions field key must match the key used in translate()moduleSettings.{moduleId}echo-translator.qt-module â Minimal translator with optionsmodules/translator-google.js â Built-in Google Translate modulemodules/translator-custom.js â Custom LLM modulemodules/mode-quick-panel.js â Interaction mode exampleFollow STORE_GUIDE.md to submit your module to the QuickTranslate Module Store.