For a custom widget I want to show different labels and title of different layout items and widget label in different languages. I want my widget to be bilingual. I want all messages or labels to be shown according to the locale suppose locale is Arabic or English ar or en.
Hi @UbaidGul_opaz ,
Hope you find this document helpful https://developers.arcgis.com/experience-builder/guide/extend-base-widget/#i18n-support
Regards,
Shengdi
Thanks I already checked this documentation. What is not working with me is widget label is still in English and when you hover on the widget icon which inside widget controller its showing same English label also on the window of the widget.
Hi @UbaidGul_opaz ,
Firstly, all your custom widget labels should read from translations folder. For example like follows
this.props.intl.formatMessage({id: 'str1', defaultMessage: defaultMessages.str1})
Secondly, you need to mention locale at the end of the url of your application. Then it will show you corresponding language labels.. You need to access your app something like follows.
https://localhost:3001/experience/1/?locale=ar
https://localhost:3001/experience/1/?locale=zh-cn
Thanks,
Ashok