Closed clicman closed 9 years ago
Found the problem. i18 object conflicts with google`s libphonenumber at global js scope. Any ideas how to fix it?
I'm sorry for not answering until now...
So, window.i18n
is used by libphonenumber
as well as i18next
.
I'll look into it. Maybe you could rename libphonenumber
's window.i18n
before i18next
is initialized. You can't rename i18next
's window.i18n
because ng-i18next
uses it.
Or we have to introduce something similar to https://api.jquery.com/jQuery.noConflict/
Regards,
Andre
As workaround I`ve renamed it in i18next and ng-i18next libraries because it was much easer to perform. So I think it would be great to have possibility to wrap i18n object into some another context.
Since i18next
version 1.8.1 there is a .noConflict()
mode.
And since version 0.4.1
of 'ng-i18nextyou can now simply add
noConflict: trueto your
ng-i18next` settings and everything should work well.
Please load Google's libphonenumber before i18next
.
Regards, Andre
@archer96 great news! Thank you!
I`ve tried to add it to my project and got:
My code is:
Called it like:
json
What I`ve missed?