Closed Rober9614 closed 3 months ago
Hi @Rober9614.
Thx for the bug report. Could you provide a stackblitz ?
Because this is actually working on my projects.
I'd prefer avoid using HttpClient as this would create other errors :/
Hi @Rober9614.
I made a new project with the public
logic, instead of the /assets
one and it worked perfectly.
The only way it may not work (in my opinion), is if you had let the /assets
and therefore have a wrong path.
I've updated the README to make it clearer
return new MultiTranslateHttpLoader(_httpBackend, ['/assets/i18n/core/', '/assets/i18n/vendors/']); // /i18n/core/ on angular >= v18 with the new public logic
I'm closing this issue. Please, feel free to reopen it if I'm mistaking and provide more information.
Cheers
According to the new version of Angular, the framework no longer uses the "assets" folder and instead uses the "public" folder. However, when trying to use the "i18n" folder within "public," the library fails to locate the files according to the specified path.
Solution: Move to "HttpClient" dependency.
Example:
`export class MultiTranslateHttpLoader implements TranslateLoader {
}`