@icarus_31 wrote:
Hi,
I wanted to try the translate service, but could not make it work.
My file imports Translate and TranslatePipe.
I assigned the TranslatePipe to pipes.
In my constructor, I added translate.translations('fr', { 'Hi': 'Bonjour'});
In my template, I have {{ 'Hi' | translate }}.
Nothing is displayed. If I put in the constructor translate.setLanguage('fr'), I will see 'Bonjour'.
Why the English version does not show up?
Thanks
Posts: 12
Participants: 2