$translate.refresh() does not cause $translate(...) to wait for network requests to complete.
See original GitHub issueWhen using the partial loader, we are adding a part and then calling $translate.refresh()
like the documentation recommends. However, we also need to use the $translate service immediately following that.
$translatePartialLoader.addPart('part1');
$translate.refresh();
$translate('ID').then(function(translation) {
$scope.variable = translation;
});
When used like this, the $translate service does not wait for the partial loader to fetch the data and refresh the system.
This is most evident when the connection getting the translation data is slow.
Issue Analytics
- State:
- Created 9 years ago
- Comments:14 (8 by maintainers)
Top Results From Across the Web
$translateChangeSuccess not fired after pageload #1449
The reason I register this event inside a controller is because I get untranslated translation key names back from the $translate() constructor ...
Read more >Translate service not working on load page - Stack Overflow
When I do a refresh I have in title of my page seo.home.title so the translation is not done, after that if I...
Read more >Continuously translate speech in near real-time.
Continuously translate speech in near real-time. · Speak to the world · Always with you · Speak, snap, write or type. The choice...
Read more >Batch requests (Advanced) | Cloud Translation
Batch translation allows you to translate large amounts of text (with a limit of 100 files per batch), and to up to 10...
Read more >RFC 5245: Interactive Connectivity Establishment (ICE)
Note that ICE is not intended for NAT traversal for SIP, which is assumed to be ... The Refresh requests will also refresh...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Actually sending events is blocking. When
$broadcasting
events, the code execution goes on, once the broadcast ist done. However,$translate.refresh()
returns a promise. @devonhumes you can actually do something like:Or you can react on
$translateRefreshEnd
event.closed due to inactivity. Feel free to reopen.