Skip to content

Commit 61265a3

Browse files
authored
Merge pull request #18 from veselv2010/fix-zoom-web-lang-funcs
add i18n functions helper for zoom web
2 parents d7095b1 + 72ee4d8 commit 61265a3

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

lib/flutter_zoom_web.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ class ZoomViewWeb extends ZoomPlatform {
3333

3434
ZoomMtg.preLoadWasm();
3535
ZoomMtg.prepareWebSDK();
36-
ZoomMtg.i18n.load(options.language);
36+
37+
ZoomMtg.i18n.load(options.language ?? 'en-US');
38+
debugPrint('Current language of Zoom - ${ZoomMtg.i18n.getCurrentLang()}');
39+
3740
ZoomMtg.init(InitParams(
3841
debug: options.debug ?? kDebugMode,
3942
helper: options.helper,

lib/web/zoom_js.dart

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class UserParams {
9898
@JS()
9999
class ZoomMtg {
100100
external static void setZoomJSLib(String path, String dir);
101-
external static final i18n;
101+
external static ZoomMtgLang i18n;
102102
external static void preLoadWasm();
103103
external static void prepareWebSDK();
104104
external static void prepareJssdk();
@@ -118,3 +118,9 @@ class ZoomMtg {
118118
external static void inMeetingServiceListener(
119119
String event, Function(MeetingStatus?) callback);
120120
}
121+
122+
@JS()
123+
class ZoomMtgLang {
124+
external String getCurrentLang();
125+
external dynamic load(String lang);
126+
}

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flutter_zoom_sdk
22
description: Zoom SDK from ZOOM ported to flutter as plugin with all necessary features and with Null Safety which is implementation by EvilRATT
3-
version: 1.2.0+2
3+
version: 1.2.0+3
44
homepage: https://github.com/evilrat/flutter_zoom_sdk
55
repository: https://github.com/evilrat/flutter_zoom_sdk
66
issue_tracker: https://github.com/evilrat/flutter_zoom_sdk/issues

0 commit comments

Comments
 (0)