text-translator

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Text Translator Tool

文本翻译工具

Description

说明

Translate text between languages using free translation services with support for auto-detection, batch processing, and file translation.
借助免费翻译服务在不同语言间翻译文本,支持自动检测、批量处理和文件翻译。

Trigger

触发条件

  • /translate
    command
  • User needs text translation
  • User wants to localize content
  • /translate
    命令
  • 用户需要文本翻译
  • 用户想要本地化内容

Usage

使用方法

bash
undefined
bash
undefined

Translate text

翻译文本

python scripts/text_translator.py "Hello world" --to zh
python scripts/text_translator.py "Hello world" --to zh

Auto-detect source language

自动检测源语言

python scripts/text_translator.py "Bonjour" --to en
python scripts/text_translator.py "Bonjour" --to en

Translate file

翻译文件

python scripts/text_translator.py --file document.txt --to es --output document_es.txt
python scripts/text_translator.py --file document.txt --to es --output document_es.txt

Batch translate

批量翻译

python scripts/text_translator.py --file strings.json --to ja --format json
undefined
python scripts/text_translator.py --file strings.json --to ja --format json
undefined

Tags

标签

translate
,
language
,
i18n
,
localization
,
text
translate
,
language
,
i18n
,
localization
,
text

Compatibility

兼容性

  • Codex: ✅
  • Claude Code: ✅
  • Codex: ✅
  • Claude Code: ✅