dojo / app

:rocket: Dojo 2 - an application framework.
http://dojo.io
Other
8 stars 14 forks source link

Add locale handling to initialization process #101

Closed mwistrand closed 7 years ago

mwistrand commented 7 years ago

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.

kitsonk commented 7 years ago

@matt-gadd @agubler this feels like a concern that we should find a solution for somewhere in our architecture.

mwistrand commented 7 years ago

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.

mwistrand commented 7 years ago

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.