Added support for multiple anonymous functions in the page.
Use case is that I want to have translations in multiple properties files and also have plugins to contain their own javascript translations in the plugin.
So I can have multiple calls to taglib in the page for example:
<asset:i18n name="plugin/bar locale="${lang}"/>
Current implementation does not support this.
I just exposed messages through $L.messages and then merge the associative arrays.
This should be also very compatible with different browsers because only thing that is used is "hasOwnProperty"
Added support for multiple anonymous functions in the page.
Use case is that I want to have translations in multiple properties files and also have plugins to contain their own javascript translations in the plugin.
So I can have multiple calls to taglib in the page for example:
<asset:i18n name="plugin/bar locale="${lang}"/>
Current implementation does not support this.
I just exposed messages through $L.messages and then merge the associative arrays. This should be also very compatible with different browsers because only thing that is used is "hasOwnProperty"
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty
If ES6 is ok the the merge function could be replaced with Object.assign()
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign