0

I'm currently working on an angular hybrib app (angular + angularJs). The app use angular-gettext and ngx-translate for translation. Both work in their own runtime but I can't make it work when I downgrade an Angular component into an angularJs one. I wonder if there is a mismatch between the two translate directives ?

lionelB
  • 209
  • 3
  • 14
  • Please provide some code examples to determine what is the problem. – Mario Petrovic Dec 27 '17 at 09:50
  • 1
    Hi Mario, there was no problem, the main problem come from that json generated by both tools haven't the same structure. angular-gettext-tool generate a file wrap translations in an object with the lang as the key. I've made plunkr http://plnkr.co/edit/JkQBPIs4ONcEZWKH7BQS?p=preview – lionelB Dec 28 '17 at 10:05
  • Can't figure it out. Hope someone joins discussion – Mario Petrovic Dec 28 '17 at 12:23
  • I mean the problem come from how translation are used. I mean, angular-gettext need a json ` {fr: {"hello": "Salut"}}`where ngx-translate need a flat json structure ( {"hello": "Bonjour"} but since I use the same i18n json file from in angular / angularJs I wasn't able to found translation in my angular component – lionelB Dec 28 '17 at 13:22

0 Answers0