将内容从一种语言翻译为另一种语言。当用户提到翻译、中英互译、多语言翻译、自动翻译时使用。
72
87%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
将内容从一种语言翻译为另一种语言
使用翻译引擎将内容从源语言翻译为目标语言。
office/skills/tools/transtools/
from office.skills.tools import transtools
result = transtools(
to_lang='en',
content='你好世界',
from_lang='zh'
)
print(result)| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
to_lang | str | 是 | - | 目标语言 |
content | str | 是 | - | 待翻译的内容 |
from_lang | str | 否 | 'zh' | 源语言(默认中文) |
str:翻译后的结果
from office.skills.tools import transtools
result = transtools(to_lang='en', content='你好,世界!')
print(result) # Hello, world!office.api.tools.transtools
2b1996b
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.