常見語言翻譯

👤 user_d39ac014 📦 v1.0.0 ⭐ 4.3 ⬇️ 562 下載
📄 辦公效率 免費

📖 技能介紹


name: translator description: "Translate text between 15+ languages with high accuracy. Supports single/batch translation, automatic language detection, multiple translation methods (API/AI), and rich output formats. Use when user needs translation, language conversion, or multi-language text processing. Trigger keywords: 翻譯, translate, 翻譯成, translation, language exchange."


Translator

Overview

Professional translation skill supporting 15+ languages with advanced features:

  1. Single Translation - Translate one piece of text
  2. Batch Translation - Translate multiple texts at once
  3. Auto Language Detection - Automatic source language detection
  4. Multiple Translation Methods - API-based and AI-based translation
  5. Rich Output Formats - Plain text, with source, detailed results

Supported Languages (15+)

Language Code Native Name
Chinese (Simplified) zh 中文(簡體)
Chinese (Traditional) zh-TW 中文(繁體)
English en English
Japanese ja 日本語
Korean ko 한국어
Russian ru Русский
Arabic ar العربية
French fr Français
German de Deutsch
Spanish es Español
Italian it Italiano
Portuguese pt Português
Thai th ไทย
Vietnamese vi Tiếng Việt
Hindi hi हिन्दी

Quick Start

Single Translation

User: "把'你好世界'翻譯成英文"
→ "Hello World"

Batch Translation

User: "把以下內容翻譯成日文:
蘋果 - Apple
香蕉 - Banana
橙子 - Orange"
→ 蘋果 - リンゴ
香蕉 - バナナ
オレンジ - オレンジ

Language Detection

User: "Translate: Bonjour le monde"
→ Auto-detect: French → "Hello World"

Core Workflow

Step 1: Detect Translation Intent

Trigger Keywords: - "翻譯" / "translate" / "翻譯成" / "translation" - "用XX語怎麼說" / "How do you say X in XX" - "Language exchange" / "convert to XX"

Detection Patterns: - Explicit: "翻譯成英文" - Implicit: "這段話用日語怎麼說"

Step 2: Parse Request

  1. Identify text to translate (single or multiple)
  2. Identify target language (explicit or implicit)
  3. Identify source language (explicit or auto-detect)
  4. Determine translation mode (single/batch)

Step 3: Process Translation

Priority: 1. Try API-based translation (if API key configured) 2. Fallback to Claude-based translation 3. Return formatted result

Step 4: Format Output

Output Formats:

Simple (default):

[translated text]

With Source:

原文(中文):你好世界
翻譯(英文):Hello World

Detailed:

原文:你好世界
源語言:中文
目標語言:English
翻譯結果:Hello World
翻譯方式:AI-based (Claude)

Advanced Features

Batch Translation

For multiple texts, process efficiently:

Input: "翻譯成韓文:
- 你好
- 謝謝
- 對不起"

Output:
- 你好 → 안녕하세요
-謝謝 → 고마워요
- 對不起 → 죄송합니다

Best practices for batch: - Use bullet points or numbered lists - Keep each item concise - Format consistently

Auto Language Detection

The skill automatically detects source language when not specified:

User: "Translate: Hello World to Chinese"
→ Detect: English → "你好世界"

Supported detection: zh, en, ja, ko, ru, ar, fr, de, es

Error Recovery

If translation fails: 1. Try alternative translation method 2. Provide partial results if possible 3. Suggest fixes for configuration issues

Example error handling:

原文:[text]
錯誤:Translation API unavailable
備選:Using AI translation
結果:[translated text]

API Configuration (Optional)

Quick Setup

Option 1: Google Translate (Free Tier)

# scripts/translate.py 中設定
api_service = 'google'
# 需要: pip install google-cloud-translate

Option 2: DeepL API

# 設定環境變數
import os
os.environ['DEEPL_API_KEY'] = 'your-key'
api_service = 'deepl'

Option 3: LibreTranslate (Free/Open Source)

api_service = 'libre'
os.environ['LIBRETRANSLATE_URL'] = 'https://libretranslate.com'

No Configuration Required: If no API is configured, Claude provides reliable AI-based translation automatically.

Usage Examples

Example 1: Simple Translation

Input: "把'謝謝'翻譯成英文" Output: "Thank you"

Example 2: Target Language in Text

Input: "翻譯成日文:今天天氣很好" Output: 今日は天気がとても良いですね

Example 3: Batch with Format

Input: "翻譯成韓文: 蘋果 香蕉 橙子" Output: - 蘋果 → 사과 -香蕉 → 바나나 - オレンジ → 오렌지

Example 4: Language Detection

Input: "Translate: Guten Morgen to Chinese" Output: 早上好

Example 5: Phrase Translation

Input: "用日語說'祝你生日快樂'" Output: お誕生日おめでとうございます

Example 6: Formal vs Informal

Input: "翻譯成韓語(敬語):謝謝你" Output: 감사합니다 (formal)

Example 7: Multiple Languages at Once

Input: "'Hello' in all languages" Output: - 中文:你好 - English:Hello - 日文:こんにちは - 韓文:안녕하세요 - 法文:Bonjour - 德文:Hallo - 等等...

Scripts

scripts/translate.py

Features: - Single and batch translation - Auto language detection - Multiple API support - Progress indicator for batch - Rich error handling

Usage:

# Single
python scripts/translate.py --text "Hello" --target zh

# Batch
python scripts/translate.py --batch --file input.txt --target ja

# With source language
python scripts/translate.py --text "Bonjour" --source fr --target en

Quality Assurance

Translation Accuracy

  • High - For major languages (zh, en, ja, ko, ru, ar, fr, de, es)
  • Medium - For other supported languages
  • Fallback available - AI translation ensures results

Best Practices

想要更強大的技能外掛,就來小蔥技能站7w4.net看看吧。

  1. Be specific about target language
  2. ✓ "翻譯成英文"
  3. ✗ "翻譯成外語"

  4. Use clear formatting for batch

  5. ✓ "翻譯成日文:\n蘋果\n香蕉"
  6. ✗ "翻譯成日文:蘋果香蕉"

  7. Specify source for ambiguous phrases

  8. ✓ "Bonjour 翻譯成中文" (specifying French)
  9. ✓ "翻譯:Bonjour to Chinese" (specifying source)

Notes

  • No API key required for AI-based translation
  • Batch translation for 2+ items supported
  • Auto-detection works for major languages
  • Results are cached for similar requests

Version History

  • v1.1 (current): Added batch translation, 15+ languages, error recovery, auto-detection
  • v1.0: Initial release with 6 languages

🤖 AI 評測

這個翻譯 Skill 功能較全面,支援多語言和批次處理,文件和示例清晰易懂,質量中上。優點是使用靈活、錯誤處理較好;不足在於實際翻譯效果依賴 AI 而非專用翻譯引擎,準確性可能不穩定,且部分功能描述與實現存在偏差。日常簡單翻譯需求可以嘗試,但對翻譯質量要求較高的場景可能不太滿足。

📊 多維度評分

適應性4.4
規範性4
有效性4.6
可靠性3.8
可信度4.5

📁 包含檔案 (2 個)

📄 SKILL.md 6.7 KB
📄 scripts/translate.py 7.6 KB