Web SDK 1.8.5 has a bug in type definition of ZooMtg.i18n

Description
Multi-Language Support section of zoom documentation let me know how to load custom language dictionary like below:

//Add your own custom language key 
var langArray = ['de-DE', 'es-ES', 'en-US', 'fr-FR', 'jp-JP', 'pt-PT','ru-RU', 'zh-CN', 'myCustomLanguageCode'];

// set the userLangTemplate variable to a default language code
var userLangTemplate = ZoomMtg.i18n.getAll("en-US");

// Define the userLangDict variable
// Use the language-key-value.json file to determine which keys to set the custom language
var userLangDict = Object.assign({}, userLangTemplate, {'apac.toolbar_leave': 'Leave Now', 'apac.wc_leave_meeting': '不要会议', 'apac.wc_joining_meeting': 'Join Meeting', "apac.wc_quality": "Video Quality"});

// Set the userLangDict and custom code language in the load method
ZoomMtg.i18n.load(userLangDict, "myLangauge");

Based on last line of code snippet above, I could know load() method of ZooMtg.i18n can take two parameters, user-defined key-value pair and language.

But type definition of Web SDK 1.8.5 shows only one parameter which is language can be passed to the method. Type definition of the method: websdk/index.d.ts at 818430d4b52df93e1c6695075bdd3bc5e3c36b86 · zoom/websdk · GitHub

Error
So I got typescript error: Expected 1 arguments, but got 2.

Which version?
Web SDK 1.8.5

Device (please complete the following information):

  • Device: MacBook Pro
  • OS: MacOS
  • Version: 11.0.1 Big Sur
  • Browser: Chrome

Hey @eunsu.dev,

Thanks for reporting this, we will take a look at the issue. :slight_smile: (CS-2749)

Thanks,
Tommy

1 Like

1.8.6 will fix this
1.8.5 you can fix it by modify index.d.ts

/**

* load Zoom office support lang 

* 'de-DE', 'es-ES', 'en-US', 'fr-FR', 'jp-JP', 'pt-PT', 'ru-RU', 'zh-CN', 'zh-TW', 'ko-KO', 'vi-VN', 'it-IT'

* @param lang

*

*/

function load(lang: string): void; 

/**

* load you language resource

* 'de-DE', 'es-ES', 'en-US', 'fr-FR', 'jp-JP', 'pt-PT', 'ru-RU', 'zh-CN', 'zh-TW', 'ko-KO', 'vi-VN', 'it-IT'

* @param url you language resource json link

* @param lang you assign lang name

*

*/

function load(url: string, lang: string): void;

/**

* change you UI language

* 'de-DE', 'es-ES', 'en-US', 'fr-FR', 'jp-JP', 'pt-PT', 'ru-RU', 'zh-CN', 'zh-TW', 'ko-KO', 'vi-VN', 'it-IT' or you loaded lang

* @param lang

*

*/

function reload(lang: string): void;

image

2 Likes

Hey @eunsu.dev,

This should now be fixed. Please upgrade to version 1.8.6:

Thanks,
Tommy

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.