dyte-io / flutter-samples

0 stars 2 forks source link

How to handle translation in dyte? #13

Open MarufHassanPietech opened 1 month ago

MarufHassanPietech commented 1 month ago

Can you please tell me how to handle translation/internationalization in dyte UI Kit? For eg I have the texts here Polls in English, I want to show it as opiniepeiling when Dutch language is selected in the app.

Screenshot_1721653301

mohamed-ehab51 commented 1 month ago

I faced the same problem and my solution is : I changed those texts in DYTE's files , just follow the functions that shows the dialogue you want to translate and change the text , not the best solution but it was the only one available

MarufHassanPietech commented 1 month ago

@mohamed-ehab51 We talked to the support team and they have updated the package and added the documentation for how to handle the locale as well.

Docs - https://docs.dyte.io/flutter/meeting-locale

The documentation has a small bug, the method has named constructor whereas in the docs they have provided it without the named constructor:

//INCORRECT CODE FROM DOCS

final DyteUiKit uikit= DyteUIKitBuilder.build(meetingInfo, 'assets/fr.arb');
//CORRECT CODE

final DyteUiKit uikit= DyteUIKitBuilder.build(uiKitInfo: meetingInfo, arbPath: 'assets/fr.arb');

@saksham-gt @thisisamank @rohitkhirid please fix this bug in the code documentation as I don't see a way to report the bug in the docs itself.