core
core copied to clipboard
fix(TranslateService): load translations if they have not been loaded before (#1193)(#1266)
This PR contains no breaking changes.
When the translateService.use(...)
method is called nothing happens if the current language is the same as the one passed as parameter. This causes that after changing the language in one instance of the translate service the rest of instances don't fetch the translations if they don't use isolate = true since the current language is the same as the one passed as parameter. That is why workarounds like this
translateService.currentLang = '';
translateService.use ('en');
worked. Removing the first return statement leaves the service check if it has the translations and gets them if they have not been loaded before. It fixes (#1193)(#1266) between other issues I am not able to find now.
also fixes #602 #444 #425
When this gonna be added? Its a blocking issue.
Sad that library seems to be abandoned