tencent cloud

Chat

News and Announcements
Release Notes
Announcements
Product Introduction
Overview
Basic Concepts
Scenarios
Features
Account System
User Profile and Relationship Chain
Message Management
Group Related
Official Account
Audio/Video Call
Use Limits
Purchase Guide
Billing Overview
Pricing
Purchase Instructions
Renewal Guide
Service Suspension Explanation
Refund Policy
Development Guidelines
Demo Zone
Activate Service
Free Demos
Quick Run
Download
SDK and Demo Source Code
Update Log
Chat Interaction (UI Included)
TUIKit Introduction
Getting Started
Full-feature Integration
Single-function Integration
Build with AI
Build Basic Interfaces
More Features
Customizing Appearance
Internationalization
Push Service
Overview
Noun explanation
Activate the Service
Quick Start
Manufacturer Channel
Statistics
Troubleshooting Tool
Client APIs
REST API
Push Callback
Advanced Features
Release Notes
Error Codes
FAQS
Desk
Overview
Quick Start
Integration Guide
Admin Operation Manual
Agent Manual
More Practices
Live Streaming Setup Guide
AI Chatbot
Super Large Entertainment and Collaboration Community
Discord Implementation Guide
How to Integrate Chat into Games
WhatsApp Channel-style Official Account Integration Solution
Send Red Packet
Firewall Restrictions
No UI Integration
Quick Start
SDK Integration
Initialization
Login and Logout
Message
Conversation
Group
Community Topic
User Profile and Relationship Chain
Offline Push
Cloud Search
Local Search
Official Channel Management
Client APIs
JavaScript
Android
iOS & macOS
Swift
Flutter
Electron
Unity
React Native
C APIs
C++
Server APIs
Secure authentication with UserSig
RESTful APIs
Webhooks
Console Guide
New Console Introduction
Creating and Upgrading an Application
Basic Configuration
Feature Configuration
Account Management
Group Management
Official Channel Management
Webhook Configuration
Usage
Viewing Guide for Resource Packages
Real-Time Monitor
Auxiliary Development Tools
Access Management
Advanced Features
FAQs
uni-app FAQs
Purchase
SDK
Account Authentication
User Profile and Relationship Chain
Message
Group
Audio-Video Group
Nickname and Profile Photo
Security Compliance Certification
Service Level Agreement
Security Compliance Certification
Chat Policies
Privacy Policy
Data Privacy and Security Agreement
Migration
Migration Solutions
Migration Solutions Lite
Error Codes
Contact Us

Web & H5 & Uniapp(Vue)

PDF
Focus Mode
Font Size
Last updated: 2026-03-06 16:14:33

Feature Description

Starting from version v2.1.0, TUIKit offers a text message translation feature. The messaging tool in the TUIChat component supports translating text messages. Currently, it can translate from mainstream languages to languages such as English, Chinese, Russian, Japanese, Korean, and more. For details on supported languages, see the Text Translation Support List.
After text translation, the results will be retained for the duration of the current login session, and remain saved even after conversation switching. If you switch conversations and change the target language for translation, the previous translation results will automatically be translated into the new target language.
Note:
The message translation feature is only available to customers of Pro, Pro Plus and Enterprise. It can be used after purchasing Pro, Pro Plus and Enterprise; the Free Trial version supports a certain limit of free trial, valid for one month.





Feature Introduction

Setting the Target Language for Translation

The default target language for translation is Chinese, but you can also manually switch the target language. Import TUIChatService from @tencentcloud/chat-uikit-engine and call the setTranslationLanguage method, as shown in the following code:
import { TUIChatService } from "@tencentcloud/chat-uikit-engine";

// Switches to English.
TUIChatService.setTranslationLanguage('en');
// Switches to Chinese.
TUIChatService.setTranslationLanguage('zh');
// Switches to Japanese and supports other languages as well.
TUIChatService.setTranslationLanguage('jp');
Note:
Logging in again will reset the default translation to Chinese.

Setting the Source Language for Translation

Currently, in TUIKit, it is default and recommended to use automatic detection of the source language, but you can also manually set the source language to ensure the accuracy of the translation.
In TUIChat/utils/translation.ts, a translation utility class Translator is implemented, where you can change the sourceLanguage attribute according to the Text Translation Language Support List.
TUIChatService.translateText({
sourceTextList: [text],
sourceLanguage: 'auto', // zh/en/jp/kr
}).then((response) => {
// response data
});

Extended Reading

The following content serves as supplementary reading material only. Text message translation and related features have been implemented in TUIKit 2.1.0 and later, and do not require manual implementation by users.

Checking Whether the Current Package Supports the Translation Feature

By querying the StoreName.APP in TUIStore for the key enabledTranslationPlugin, the obtained boolean value indicates whether the feature is enabled.
const enable = TUIStore.getData(StoreName.APP, 'enabledTranslationPlugin');

Removing the Translation Feature

In the file TUIKit/components/TUIChat/message-list/message-tool/index.vue, simply delete the object with the key translate in actionItems.
{
key: 'translate',
text: TUITranslateService.t('TUIChat.Translation'),
visible: false,
iconUrl: translateIcon,
renderCondition() {},
clickEvent: translateMessage,
}

Text Translation Language Support List

Source Language
Supported Target Language
zh (Simplified Chinese)
en (English), ja (Japanese), ko (Korean), fr (French), es (Spanish), it (Italian), de (German), tr (Turkish), ru (Russian), pt (Portuguese), vi (Vietnamese), id (Indonesian), th (Thai), 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 (Indonesian), th (Thai), ms (Malay)
en (English)
zh (Chinese), ja (Japanese), ko (Korean), fr (French), es (Spanish), it (Italian), de (German), tr (Turkish), ru (Russian), pt (Portuguese), vi (Vietnamese), id (Indonesian), th (Thai), ms (Malay), ar (Arabic), hi (Hindi)
ja (Japanese)
zh (Chinese), en (English), ko (Korean)
ko (Korean)
zh (Chinese), en (English), ja (Japanese)
fr (French)
zh (Chinese), en (English), es (Spanish), it (Italian), de (German), tr (Turkish), ru (Russian), pt (Portuguese)
es (Spanish)
zh (Chinese), en (English), fr (French), it (Italian), de (German), tr (Turkish), ru (Russian), pt (Portuguese)
it (Italian)
zh (Chinese), en (English), fr (French), es (Spanish), de (German), tr (Turkish), ru (Russian), pt (Portuguese)
de (German)
zh (Chinese), en (English), fr (French), es (Spanish), it (Italian), tr (Turkish), ru (Russian), pt (Portuguese)
tr (Turkish)
zh (Chinese), en (English), fr (French), es (Spanish), it (Italian), de (German), ru (Russian), pt (Portuguese)
ru (Russian)
zh (Chinese), en (English), fr (French), es (Spanish), it (Italian), de (German), tr (Turkish), pt (Portuguese)
pt (Portuguese)
zh (Chinese), en (English), fr (French), es (Spanish), it (Italian), de (German), tr (Turkish), ru (Russian)
vi (Vietnamese)
zh (Chinese), en (English)
id (Indonesian)
zh (Chinese), en (English)
th (Thai)
zh (Chinese), en (English)
ms (Malay)
zh (Chinese), en (English)
ar (Arabic)
en (English)
hi (Hindi)
en (English)


Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback