Closed mwistrand closed 7 years ago
@matt-gadd @agubler this feels like a concern that we should find a solution for somewhere in our architecture.
If we do solve this within @dojo/app
, then we will need either a single entry point or a dedicated entry point for both applications and custom elements. Further, any Dojo 2 application or custom element would be required to pull in @dojo/app
just to support multiple locales without additional manual setup beyond the .dojorc
, which may not be what we want.
This functionality is implemented with dojo/webpack-contrib#14, and will be incorporated in a future release of dojo/cli-build-app. In any case, this functionality is no longer the responsibility of this repo, and therefore this issue can be closed.
Enhancement
When a Dojo application starts up, before creating any widgets, the application's root locale needs to be set. An application will have a default locale, plus an optional list of supported locales. If the end user's system locale is among the supported locales, the application will load with that as its root locale. Otherwise, the default locale will be used.
Any solution should also take webpack builds into consideration, since in that scenario the list of supported locales will be injected into the build from a
.dojorc
, instead of being passed in through a method call.