translate.service.use('siliconflow');
in your JavaScript to use the free Qwen3-8B translation model provided by SiliconFlow./mnt/service/config.properties
and edit it. Find:
translate.service
by executing the restart command:
english
. More supported languages can be found by visiting http://your-server-ip/language.json["Hello", "World"]
.{"result":1,"info":"success","to":"english","text":["Hello","World"]}
Note:The Content-Type header should either be unset or set to application/x-www-form-urlencoded.
curl Translation Example:
To help you better understand how to use the API, here is a curl request example.
You can copy and run it directly to see the effect:
</html>
tag at the end of your webpage.<select>
dropdown will appear at the bottom of the page, allowing you to switch languages and see the effect in real time.
translate.js
file and host it within your own project. It has no external dependencies and is written in pure, native JavaScript.translate.js
is fully open-source, and you can always get the latest version from:translate.execute();
call must be placed at the very bottom of the page — it ensures that all DOM elements have been rendered before triggering the translation process across the entire page.
/mnt/service/logs/
directory.
openai_yyyy-MM-dd.log
contain logs of text translations performed using the large model via the OpenAI interface provided by SiliconFlow.
For example: openai_2025-05-17.log
yyyy-MM-dd
refers to the current date. A new log file is generated daily based on the date.
Each log entry records the original text, the translated text, the translation timestamp, the translation quality review score, whether the repair mechanism was triggered, and more.translate.service.log
is the system operation log that records the runtime status of the translate.service itself.
request_yyyy-MM-dd.log
contains logs of translation requests made to /translate.json
.translate.json
refers to the text translation API; language.json
refers to the API that retrieves the list of supported languages.translate.json
translation API, if a file cache hit occurs, this parameter records the name of the cached file, which is stored in /mnt/service/cache/
.translate.json
translation API, records the character count of the original text (source text, not the translation).translate.json
translation API, records the character count of the translated text (translation, not the source).translate.json
translation API, if the website uses translate.js
, this is the domain name of that website (automatically detected).translate.json
translation API, the target language of the translation.translate.json
translation API, if you have assigned a translation key via domain.json
configuration, this records that key.translate.json
translation API, if an in-memory cache hit occurs, this records the number of cache hits (since translate.json
supports translating multiple texts at once).translate.json
translation API, if an in-memory cache hit occurs, this records the number of characters hit in the cache (translation text character count, not the source).