来源信息
- 仓库
- CoderWanFeng/python-office
- 最近来源活动
- 2026年8月4日 13:18
- 检测到的 SKILL.md 语言
- 中文
- 星标
- 1,370
- Forks
- 305
安装方式
默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。
检查来源文件
决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。
文件资源管理器
2 个文件正在显示 SKILL.md
SKILL.md
来源说明 · 只读预览- name
- transtools
- description
- 将内容从一种语言翻译为另一种语言。当用户提到翻译、中英互译、多语言翻译、自动翻译时使用。
# transtools Skill
> 将内容从一种语言翻译为另一种语言
## 功能描述
使用翻译引擎将内容从源语言翻译为目标语言。
## 所属分类
`office/skills/tools/transtools/`
## 调用方式
```python
from 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`:翻译后的结果
## 使用示例
```python
from skills.tools import transtools
result = transtools(to_lang='en', content='你好,世界!')
print(result) # Hello, world!
```
## 原始函数
`office.api.tools.transtools`
在 GitHub 查看