Translation
The Signal bot provides three translation modes for cross-language communication in community groups.
On-Demand Translation (!translate)
Section titled “On-Demand Translation (!translate)”Translate text or quoted messages on the fly.
Commands:
!translate <language> <text>: Translate text to a language.!tr <language>: Reply to a message to translate it.!tr <text>: Translate to English (default).!trans: Alias for!translate.
Examples:
!translate spanish Hello, how are you?!tr ja Good morning!tr es (reply to a message)!tr Bonjour tout le monde (translates to English)Languages supported:
Over 50 languages including: en, es, fr, de, ja, ko, zh, ar, ru, pt, it, hi, uk, pl, tr, vi, th, nl, sv, and more.
Accepts ISO 639-1 codes (es, ja), full names (spanish, japanese), or common aliases (mandarin -> zh, farsi -> fa).
Rate limit: 10 translations per hour per user.
Requires: AI features enabled in the room (!room ai on).
Room Auto-Translate (!room translate)
Section titled “Room Auto-Translate (!room translate)”Automatically translate all non-target-language messages in a room. When enabled, any message not in the configured language gets a translation posted below it.
Commands (Admin only):
!room translate on <language>: Enable auto-translate to the target language.!room translate off: Disable auto-translate.!room: Shows current translate status alongside other room settings.
Examples:
!room translate on english Auto-translate everything to English!room translate on es Auto-translate everything to Spanish!room translate off DisableHow it works:
- Bot detects the language of each message
- If it differs from the room’s target language, the message is translated
- Translation appears as:
🌐 Spanish -> English: [translated text]
Skipped messages:
- Commands (starting with
!) - Short messages (< 5 characters)
- Emoji-only messages
- Messages already translated (starting with
🌐) - Bot’s own messages
Rate limit: 30 auto-translations per minute per room.
Babel Fish Relay (!trelay)
Section titled “Babel Fish Relay (!trelay)”Create a private relay room with bidirectional translation between two groups. The bot translates ALL messages flowing both directions — like a real-time Babel Fish.
Aliases: !trelay, !request_t, !reqt
How It Works
Section titled “How It Works”┌──────────────────────┐ ┌─────────────┐ ┌──────────────────────┐│ Relay Room │ │ Bot │ │ Target Group ││ (Users + Bot) │ │ (Babel Fish │ │ (Community) ││ │ │ Translator)│ │ ││ User types in │──────>│ Translate │──────>│ "Juan [es]: ││ Spanish │ │ ES -> EN │ │ Hello everyone!" ││ │ │ │ │ ││ "🐟 Sarah: │<──────│ Translate │<──────│ Sarah types ││ ¡Hola Juan!" │ │ EN -> ES │ │ in English │└──────────────────────┘ └─────────────┘ └──────────────────────┘ALL messages from the target group are relayed back to the relay room (not just replies). This is true Babel Fish mode — full bidirectional translation.
Creating a Relay
Section titled “Creating a Relay”Self-relay (create for yourself, single language):
!trelay <my_language> <room#/name>!trelay spanish 5 (you speak Spanish, group is English by default)!trelay arabic tech (you speak Arabic, target "tech" group)Two-language form (specify both languages):
!trelay <my_language> <group_language> <room#/name>!trelay english spanish 5 (you speak English, group speaks Spanish)!trelay french arabic tech (you speak French, group speaks Arabic)Multi-user relay (add others to the relay room):
!trelay english spanish 5 @user1 @user2 @user3!trelay spanish tech @Maria @AhmedAnonymous relay (group names instead of display names):
!trelay --anon spanish 5!trelay --anon english spanish tech @user1 @user2Options
Section titled “Options”| Flag | Description |
|---|---|
--anon / --annon / -a | Anonymous mode: hides display names in both directions. Target group sees “Relay”, relay room sees the target group’s name instead of individual names. |
--named / -n | Named mode (default): display names shown in both directions. |
Room Selector
Section titled “Room Selector”Use a group number from !groups (e.g., 5) or a keyword to search group names (e.g., tech). Must be at least 3 characters for keyword search.
What Happens
Section titled “What Happens”- Bot creates a private Signal group with the bot + all specified users
- Bot sends a bilingual welcome message in the relay room
- Bot announces in the target group:
🐟 Babel Fish activated! [users] connected ([language] <-> [language]). - Relay -> Group: Messages typed in the relay room are translated and posted to the target group as
Name [xx]: translated text - Group -> Relay: ALL messages in the target group are translated and posted to the relay room as
Name: translated text
Anonymous Mode
Section titled “Anonymous Mode”In anonymous mode (--anon):
- Relay -> Group: Messages appear as
Relay [xx]: translated text(no display names) - Group -> Relay: Messages appear as
GroupName: translated text(group name instead of individual names)
This is useful when you want to protect the identity of relay participants.
Managing Relays
Section titled “Managing Relays”Any user:
!relay end: End the relay for the current room (run in the relay room)
Admin only:
!relay status: List all active translation relays!relay end @user: End a specific user’s relay
Examples
Section titled “Examples”# Self-relay (you speak Spanish, group speaks English by default)!trelay spanish 5
# Two-language relay (you speak English, group #5 speaks Spanish)!trelay english spanish 5
# Multi-user relay (you + Maria + Ahmed speak French, group speaks Arabic)!trelay french arabic tech @Maria @Ahmed
# Anonymous multi-user relay!trelay --anon spanish 3 @user1 @user2
# Check active relays (admin)!relay status
# End a relay (in the relay room)!relay end
# End someone's relay (admin)!relay end @MariaDatabase
Section titled “Database”Translation features use two database additions (migration 036_translation_features.sql):
signal_groups table additions:
| Column | Type | Description |
|---|---|---|
translate_enabled | BOOLEAN | Whether auto-translate is on for this room |
translate_target_language | VARCHAR(10) | ISO 639-1 target language code |
translation_relays table:
| Column | Type | Description |
|---|---|---|
id | SERIAL | Primary key |
user_uuid | VARCHAR(255) | UUID of the relay user |
user_name | VARCHAR(255) | Display name of the relay user |
user_language | VARCHAR(10) | Language the user speaks |
relay_group_id | VARCHAR(255) | Signal group ID of the private relay room |
target_group_id | VARCHAR(255) | Signal group ID of the community group |
target_language | VARCHAR(10) | Language of the target group (default: en) |
anonymous | BOOLEAN | Whether the user’s name is hidden |
status | VARCHAR(50) | active or ended |
message_count | INTEGER | Messages translated through this relay |
created_at | TIMESTAMPTZ | When the relay was created |
ended_at | TIMESTAMPTZ | When the relay was ended |
Technical Notes
Section titled “Technical Notes”- Translation uses OpenAI
gpt-4o-miniwith Local AI fallback - Language detection is done before translation to avoid unnecessary API calls
- Relay messages use the format
Name [xx]: textwherexxis the language code - Auto-translate and relay both skip the bot’s own messages to prevent loops
- Babel Fish relay forwards ALL target group messages (not just quoted replies)
- Loop prevention: bot messages, relay-format messages, and commands (
!) are skipped - Stale relays can be cleaned up after 24 hours of inactivity
For developer documentation including architecture diagrams, code paths, and integration details, see docs/TRANSLATION-SYSTEM.md.