question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TranslatService does not translate after upgrading to angular 4.0.1

See original GitHub issue

I’m submitting a … (check one with “x”)

[x] bug report => check the FAQ and search github for a similar issue or PR before submitting
[ ] support request => check the FAQ and search github for a similar issue before submitting
[ ] feature request

Current behavior TranslateService always returns the key instead of the translation as soon as i upgraded to angular 4.0.1 Same code was ok on angular 2.4.x. The Pipe and template are translating correctly although.

Expected/desired behavior Support angular 4.0.1

Please tell us about your environment:

  • ngx-translate version: 6.0.1

  • Angular version: 4.0.1

  • Browser: [all ]

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
SamVerschuerencommented, Apr 18, 2017

TranslateService.use returns an Observable so I believe you can subscribe on that one and if it completes, the language is loaded.

2reactions
SamVerschuerencommented, Apr 18, 2017

Well yes, see the description of the instant method. Locally this wouldn’t cause problems because loading data from your localhost is almost instant. But when you deploy your app, loading the translation file will cause a delay. So I think you will have to subscribe to the get method in order to fix it. Nothing we can do here I’m afraid.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ngx-translate not working on production after upgrade to ...
Upgrade ur ngx-translate package version from v8 to v13 which supports angular 10+. "@ngx-translate/core": "13.0.0",.
Read more >
How to translate your Angular app with ngx-translate
1. Add ngx-translate to your Angular application 2. Set up the TranslateService in your app.module.ts 3. Create your main language translation file (in...
Read more >
How To Use ngx-translate with Angular - DigitalOcean
At some point, your web application may require serving a multilingual user base. Internationalization, or i18n for short, is the process by ...
Read more >
Prepare component for translation - Angular
Mark text in component templatelink. In a component template, the i18n metadata is the value of the i18n attribute. content_copy
Read more >
@ngx-translate/core - Awesome JS
core/http-loader: ngx-translate is now built for Angular 13, ... The library is now distributed only for ivy as the view engine is no...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found