Dear forum members,
i am new to ionic 4 and did not use angualr and ionic since ionic1. I have one beginner question and would be very thankful if soeone could give me a hint on what i am overlooking.
I am using angular 7 and ionic 4 for my application and want to make on multilanguage on buttonclicks. For this purpose i tried the ngx-translate module: http://www.ngx-translate.com/. If i make the tutorial and create a new angular application everything works.
It even works in my ionic application, but only if i translate text chunks in the app.component.html According to the instructions i have to importy and modify app.module.ts and app.component.ts.
However, i want to translate some text in other pages then the app.componen.html. There are a lot of pages and they are all lazy loaded.
What am i doing wrong at this stage? What do i need to import in other pages in order to translate text there? My example page is “tab1” page. I have imported import { TranslateService } from ‘@ngx-translate/core’; in the tab1.module.ts But if i try to translate ion-card-title>
demo.text
on buttonclick nothing happens and the resource from json in the default language is not loaded.My second question considers the imported “HttpClientModule” and the “HttpModule”. Why does the ngtx-translate docu suggests to import HttpClientModule and the ionic docu suggests to import HttpModule? What is the difference anyway?
Thank you a lot in advane.
Kind Regards
D. Petrik