Hello,
I am looking to localize my Polymer app. I have looked at AppLocalizeBehaviour and see that it works in one of 2 ways. Either you inline the resources as a property or it issues an Ajax call to access a resources file in the server using loadResources. My server requires an authentication token on all rest calls - so the resources Ajax call is rejected .
I then issued the rest call myself with the auth token to get the resources from the server, but have not found a way to update the resources property in such a way that the localise picks it up. The example shows <div>{{localize('hello', 'name', 'Batman')}}</div> .
This does not pick up the resource property. I have an observer on the resources property and see that it is changing after the page is loaded - but I do not know how to get the resources into the localise method. I have access to this.localise function in my observer but it does not seem to accept any parameters and returns undefined.
I then tries to install formatjs - by installing intl and formatjs npm packages - but my build fails, so did not get the underling libraries to work.
Any thoughts , all the best, David