[optimization] How to lazy load the translation on the web?

Please provide the following:

  1. SDK Version: 36
  2. Platforms(Android/iOS/web/all): all

react-admin use a i18nProvider that is in charge of returning the proper messages depending on the passed locale.

It also can lazy load unnecessary messages, since we only need one at boot.

This demonstrate the issue using promise: https://github.com/marmelab/react-admin/blob/master/docs/Translation.md#lazy-loading-locales

So far, in the web application we must load all locales which can be quite faraminous, is there a way to use a function to return the proper language? Maybe this should be discussed.

Thanks and best