Skip to content

Commit 2169c00

Browse files
committed
Add "Translate messages" section
1 parent 23e688f commit 2169c00

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,26 @@ media:
6262

6363
There are also some more options to restrict those downloads to specific file types, chats or limit them by size. For more options, have a look into the [config.sample.yml](config.sample.yml).
6464

65+
## Translate messages
66+
67+
It is possible to use the Telegram API to translate messages.
68+
69+
You might specify the target language using the `translate_to_lang` property in your `config.yml`:
70+
71+
```yaml
72+
translate_to_lang: "en"
73+
```
74+
75+
Note: Use the two-letter ISO 639-1 language code (examples: "de", "en", "es", "it").
76+
77+
The translated message will be written into `translated_text` which can be mapped to any field using the output map configuration in your `config.yml`:
78+
79+
```yaml
80+
output_map:
81+
"message.original": "message.text"
82+
"message.translated": "translated_text"
83+
```
84+
6585
## Initial setup
6686

6787
When started for the first time, the application will ask you to connect with your Telegram account.

0 commit comments

Comments
 (0)