ebidel / i18n-msg

Polymer element for i18n string replacement
https://ebidel.github.io/i18n-msg/
63 stars 21 forks source link

Set messagesUrl on created #16

Closed robinglen closed 9 years ago

robinglen commented 9 years ago

Hi,

I wasn't sure if there was another way to do this, or if this was how you would go about it, but I wanted to set the locales url outside the component that was going to use it:

<script>I18nMsg.url="/path/to"</script>
<my-component-containing-i18n></my-component-containing-i18n>

But that didn't get picked up until inside _languageChanged so in my example it wouldn't pick up the location until it was too late.

This worked for me but please let me know if there is a better way. Thanks, Robin

ebidel commented 9 years ago

Does https://github.com/ebidel/i18n-msg/pull/18 fix this for you?

robinglen commented 9 years ago

ha yeah, thats much better. Thanks

ebidel commented 9 years ago

Cool. I pushed a new version of the element. bower update!