OpenParable
Skip to content
← Back to skills

Transtools

Documents
transtools

Transtools is an Agent Skill for documents published in the CoderWanFeng/python-office repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

将内容从一种语言翻译为另一种语言。当用户提到翻译、中英互译、多语言翻译、自动翻译时使用。

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/CoderWanFeng/python-office/blob/HEAD/skills/tools/transtools/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/transtools, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

transtools Skill

将内容从一种语言翻译为另一种语言

功能描述

使用翻译引擎将内容从源语言翻译为目标语言。

所属分类

office/skills/tools/transtools/

调用方式

from office.skills.tools import transtools

result = transtools(
    to_lang='en',
    content='你好世界',
    from_lang='zh'
)
print(result)

参数说明

参数类型必填默认值说明
to_langstr是-目标语言
contentstr是-待翻译的内容
from_langstr否'zh'源语言(默认中文)

返回值

str:翻译后的结果

使用示例

from office.skills.tools import transtools
result = transtools(to_lang='en', content='你好,世界!')
print(result)  # Hello, world!

原始函数

office.api.tools.transtools