Setting a Language
API Description
This API is used to set the meeting UI language.

1. To set the language when joining a meeting, call this API in then of the joinConf API.
2. After joining a meeting, you can call this API at any time to change the UI language.
3. By default, the meeting UI language is Chinese.
Method Definition
1
|
setLang(lang,path):Promise<Result> |
Parameter Description
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
lang |
Yes |
string |
zh-CN: Chinese. en-US: English. ar: Arabic (custom language). |
path |
No |
string |
Request path of the custom language. (Currently, only Arabic is supported.) 1. Complete request path. Example: https://api.example.com/lang.json 2. Relative request path (the frontend and backend paths must have the same origin). Example: /lang.json Obtain UI strings in the source language file, for example, en_US.json, from the common and sdk folders in the Web UI SDK package. In the JSON files, each value indicates the UI string text. Merge the obtained files content into one and translate the strings into the target custom language. Example: Current language text in JSON format: { "title": "My Meeting" } Custom language text in JSON format: { "title": "اجتماعاتي" } |
Return Values
For details about the error structure, see Table 3.
Sample Code
1 2 3 4 5 6 7 8 9 10 |
/** * Join a meeting and set the language. */ HWMeeting.joinConf({confId, pwd, nickName, token}).then(() => { HWMeeting.setLang('en-US'); // Set the language. ... }).catch((e) => { // API calling failed. ... }) |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot