Ionic 3 - Load translation from API URL

Viewed 342

I'm actually working on a mobile app with Ionic 3, everything is ok till now. Eveything work fine. I set translation with ngx-translate. So i got all my files in a folder "/assets/i18n/". I can call my data in templates or components so everything is ok.

But my client, wants that those translation files come from a web API. SO they can update them as they want. I searched here on found some things like this link "Ngx-translate - TranslateHttpLoader with external URL" ( I didn't want to answer this topic cause I don't have answer, just questions and as my profile is new I can't comment it )

I read all of this but i can't understand it perfectly so, i keep missing something, so please how can i create a custom loader for calling those translation file ?

I tried to create a provider/service but is that a specific kind of file for a loader ? Where to put it in my app ?

That's the last stop for my app to run. So please if someone know the answer can you help me a little bit with it ? I want to understand exactly how to call those json film from URL !

I can add more code if you want, but actually i got no error i just don't know how to create this "loader" from last topic. And where to put it.

0 Answers
Related