Hi,

We have a requirement to internationalize the text content of widgets. So
far we have identified 2 approaches to achieve this;

   1. Have a single locale.json file that contains the message id to text
   mapping for all locales within the *'resource'* directory of the widget.
   However. this will result in the the widget needing to be re-built whenever
   a change is made to the locale.json file.

   2. Have the {locale}.json files in carbon-dashboards and load the json
   files to the widget via an API call in the same manner it is done in the SP
   portal. Currently, the SP portal locale files are located in directory
   *'components/dashboards-web-component/public/locales/'*. The widget
   specific locale files could be placed in directory
   *'components/dashboards-web-component/public/locales/widgets/{widget_name}/'.
*

The second approach seems a better alternative as it will eliminates the
need to re-build widgets when new locales are added.

Any ideas on these 2 approaches or any other approach is highly appreciated.

Thanks,
Regards,
Ruwini.
-- 
Ruwini Wijesiri
Software Engineer,
WSO2 Inc.

Mobile : +94716133480

<http://wso2.com/signature>
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to