Tools
Auto Translation
openclaw plugin for automatic message translation. libre translate by default. day 11 of 20 days of claw.
Install
openclaw plugins install -l
Configuration Example
{
"plugins": {
"auto-translation": {
"agentLanguage": "en",
"providerUrl": "http://localhost:5000"
}
}
}
README
# auto-translation
openclaw plugin for automatic message translation. detects language on incoming messages, translates to your agent's language. translates outgoing messages back to the sender's language.
uses [libre translate](https://libretranslate.com/) by default - self-hosted, no API keys, no cloud dependency.
## install
```bash
openclaw plugins install -l .
```
## config
add to your `openclaw.json`:
```json
{
"plugins": {
"auto-translation": {
"agentLanguage": "en",
"providerUrl": "http://localhost:5000"
}
}
}
```
### options
| option | default | what it does |
|--------|---------|-------------|
| `agentLanguage` | `"en"` | language your agent thinks in |
| `providerUrl` | `"http://localhost:5000"` | libre translate instance URL |
| `autoTranslateInbound` | `true` | auto-translate incoming messages |
| `autoTranslateOutbound` | `true` | auto-translate outgoing messages |
## tools
- **translate_text** - translate text between any supported language pair
- **detect_language** - detect what language a piece of text is in
- **translation_config** - view or update translation settings at runtime
## hooks
- **message_received** - detects sender's language and translates to agent language
- **before_message_send** - translates back to sender's language automatically
## libre translate setup
run it locally with docker:
```bash
docker run -d -p 5000:5000 libretranslate/libretranslate
```
or use a public instance (less reliable, rate limited).
## how it works
1. message comes in from a spanish speaker
2. plugin detects spanish, translates to english for the agent
3. agent processes and responds in english
4. plugin remembers the sender speaks spanish, translates response back
language memory persists for the session. no storage, no database, just a map.
## day 11 of [20 days of claw](https://github.com/StressTestor)
tools
Comments
Sign in to leave a comment