EddyVerbruggen / nativescript-localize

Internationalization plugin for NativeScript using native capabilities of each platform
MIT License
79 stars 31 forks source link

L() doesn't work for views without binding context #26

Closed surdu closed 6 years ago

surdu commented 6 years ago

First of all, thanks for this awesomely mentained plugin !

In a vanilla javascript NS app, if you have an XML view that doesn't have a binding context attached to it, all the L() functions in that XML view will return empty string (or not work).

lfabreges commented 6 years ago

Indeed, I don't know why, in the demo app I just set an empty context with page.bindingContext = {};. I don't think this is something specific to this plugin. It may be worth a check to see if the same problem exists with an other application resource mapped to a dummy function.

surdu commented 6 years ago

Was this fixed ? If not, maybe it's just worth mentioning in the documentation maybe ?

lfabreges commented 6 years ago

I tried it with a dummy function set as the L resource instead of the localize method and the same problem occurs, looks like it's a NativeScript issue and not related to this plugin