SDKsuni-appEnterprise
Translate text and messages
OpenIM uni-app / uni-app x SDK guide for Translate text and messages.
translateText() and translateMessage() are Commercial on Android and iOS. HarmonyOS returns platform-unsupported.
import { translateText } from '@/uni_modules/unix-openim-sdk'
const result = await translateText({ text: 'Hello', targetLanguage: 'zh-CN' })Use the exact frozen parameter model, keep source text/message intact, and display translation as derived content. Treat language output as untrusted user-visible text and preserve privacy consent.
Was this page helpful?