Need help with ng2-translate in RC0


try to use an exported function for the factory, like reedrichards did.
The way you did was not working for me as well


Yes i am using it, the fuction solved compilation errors on device, but text is not translated. :sleepy:


Did you told translation service that you want to use cs.json or en.json?

In app.component.ts, do you have in a function like the following (just an example to tell the translation service to load/switch the language):

this.platform.ready().then(() => {
  let  userLang = navigator.language.split('-')[0];
   userLang = /(cs|en)/gi.test(userLang) ? userLang : 'en';



Thank you, that was the problem :smiley: . You deserve cookie :slight_smile: :kissing_smiling_eyes:


After noticing the warnings when I ran npm install ng2-translate --save that the angular core etc. were not there,
I ‘fixed’ the problem by add the @angular… dependencies to the package.json, re-running npm install ng2-translate --save and npm install on the ionic2 app.