dojo / i18n

:rocket: Dojo 2 - internationalization library.
http://dojo.io
Other
6 stars 19 forks source link

Implement message dictionary caching. #19

Closed mwistrand closed 8 years ago

mwistrand commented 8 years ago

When dojo-i18n is incorporated into dojo-widgets, there will need to be a way to synchronously load message dictionaries, in order to reduce the number of invalidate calls needed to render the correct locale-specific messages. Since the dojo-loader caches modules it has already loaded, creating a separate cache within dojo-i18n seemed redundant. However, now that there is a need for synchronous message loading, implementing a cache is also now necessary.

mwistrand commented 8 years ago

getCachedMessages should also check the list of supported locales, returning the default messages if the specified locale is not supported.