xfyun-translate

Translate text between Chinese, English, Japanese, Korean and 70+ languages via CLI.

Updated Mar 15, 2026
One-click install
npx skills add https://github.com/Jaykaijack/openclaw-backup --skill xfyun-translate
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: xfyun-translate
Source: https://github.com/Jaykaijack/openclaw-backup/tree/main/skills/xfyun-translate
Command: npx skills add https://github.com/Jaykaijack/openclaw-backup --skill xfyun-translate

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Provide fast, scriptable machine translation for command-line and automation workflows so users can quickly convert text between Chinese, English, Japanese, Korean and many other languages without installing external Python packages.

Core Features & Use Cases

  • 70+ language pairs with common aliases for convenience and auto-detection support where available.
  • CLI and file/stdin support for single-sentence translations, file translation, and piping text from other tools.
  • Production-ready request signing using HMAC-SHA256, base64-encoded text payloads, and robust JSON parsing to handle API responses.
  • Use Case: Localize UI strings or translate chat and customer messages by piping text into the script or pointing it at a text file for batch processing.

Quick Start

Translate the sentence "人工智能改变世界" from Chinese to English using the xfyun-translate command-line script.

Frequently Asked Questions about xfyun-translate

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I translate text files from the command line without installing Python packages?▼

Command-line text translation can be performed using only the Python standard library by running the xfyun-translate script. It pipes text from stdin or reads files and sends payloads to the iFlytek v2 API without requiring external package installations.

What environment variables do I need to configure for iFlytek machine translation?▼

iFlytek machine translation requires three environment variables: XFYUN_APP_ID, XFYUN_API_KEY, and XFYUN_API_SECRET. These credentials authorize API requests using HMAC-SHA256 signing and base64-encoded JSON payloads.

Does xfyun-translate support piping text from other CLI tools for localization workflows?▼

xfyun-translate fully supports piping text from stdin for localization workflows. You can pipe output from other command-line tools directly into the script to translate UI strings or chat messages seamlessly.

Can I auto-detect the source language when translating text between Chinese, English, Japanese, and Korean?▼

Auto-detection is supported where available when translating text between Chinese, English, Japanese, Korean, and 70+ other languages. The script accepts common language aliases for convenience in command-line operations.

What is the best way to automate batch translation of customer messages in a script?▼

Automating batch translation of customer messages is best achieved by pointing the script at a text file or piping text into it. The script processes short to medium texts using production-ready request signing.

Are there limitations when translating large files through the iFlytek v2 translation API?▼

The iFlytek v2 translation API integration is designed for short to medium texts rather than large files. It handles command-line and scriptable workflows using base64-encoded JSON payloads, which may restrict payload sizes.