The message translation feature currently supports the translation of text messages only, which can be triggered by manual API calls. Non-text messages such as image, video, file, audio, and custom messages cannot be translated.
Note:
Text translation is a value-added paid feature, which is still in the beta phase. You can contact us through the Telegram Technical Support Group to enable you to experience the full feature.
This feature is available only in SDK enhanced edition v7.0 or later.
Effect
You can use the Message Translation feature to implement the translation effect shown in the diagram below:
Note:
You can also directly use the UI-inclusive Translation Plugin, TUITranslationPlugin, to quickly obtain translation capabilities.
1. Multiple text messages can be passed in at a time.
2. UTF-8 encoding is required; otherwise, translation will failed.
3. For non-pure texts such as those with HTML tags, the translation may fail.
4. The total texts to be translated per request can contain up to 2,000 characters (each Chinese character, letter, punctuation mark, or space is counted as a character).
sourceLanguage
Source language
Pass in a specific language or auto (automatically identify the source language). If no value is passed in, the default value auto will be used.
en (English), ja (Japanese), ko (Korean), fr (French), es (Spanish), it (Italian), de (German), tr (Turkish), ru (Russian), pt (Portuguese), vi (Vietnamese), id (Bahasa Indonesian), th (Thai), and ms (Malay)
zh-TW (Traditional Chinese)
en (English), ja (Japanese), ko (Korean), fr (French), es (Spanish), it (Italian), de (German), tr (Turkish), ru (Russian), pt (Portuguese), vi (Vietnamese), id (Bahasa Indonesian), th (Thai), and ms (Malay)
en (English)
zh (Simplified Chinese), ja (Japanese), ko (Korean), fr (French), es (Spanish), it (Italian), de (German), tr (Turkish), ru (Russian), pt (Portuguese), vi (Vietnamese), id (Bahasa Indonesian), th (Thai), ms (Malay), ar (Arabic), and hi (Hindi)
ja (Japanese)
zh (Simplified Chinese), en (English), ko (Korean)
ko (Korean)
zh (Simplified Chinese), en (English), ja (Japanese)
fr (French)
zh (Simplified Chinese), en (English), es (Spanish), it (Italian), de (German), tr (Turkish), ru (Russian), and pt (Portuguese)
es (Spanish)
zh (Simplified Chinese), en (English), fr (French), it (Italian), de (German), tr (Turkish), ru (Russian), and pt (Portuguese)
it (Italian)
zh (Simplified Chinese), en (English), fr (French), es (Spanish), de (German), tr (Turkish), ru (Russian), and pt (Portuguese)
de (German)
zh (Simplified Chinese), en (English), fr (French), es (Spanish), it (Italian), tr (Turkish), ru (Russian), and pt (Portuguese)
tr (Turkish)
zh (Simplified Chinese), en (English), fr (French), es (Spanish), it (Italian), de (German), ru (Russian), and pt (Portuguese)
ru (Russian)
zh (Simplified Chinese), en (English), fr (French), es (Spanish), it (Italian), de (German), tr (Turkish), and pt (Portuguese)
pt (Portuguese)
zh (Simplified Chinese), en (English), fr (French), es (Spanish), it (Italian), de (German), tr (Turkish), and ru (Russian)