Getting 404 Not Found for translation files.
See original GitHub issueI’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 Receiving this error message in console output: EXCEPTION: Response with status: 404 Not Found for URL: /assets/i18n/en-us.json
Expected/desired behavior No error message
Reproduction of the problem I’ve followed the readme exactly and have been struggling for a few hours to get this working. Using the translate.setTranslations method works, but using the HTTP loader does not.
What is the expected behavior? Translation files are loaded properly.
What is the motivation / use case for changing the behavior? Doesn’t work.
Please tell us about your environment:
-
ngx-translate version: 6.0.0
-
Angular version: 2.4.0
-
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
Issue Analytics
- State:
- Created 7 years ago
- Comments:7
Top GitHub Comments
@LeHoanVu if you’re using the InMemoryWebApiModule for mock network requests, you’ll need to remove it. In my case I ended up writing my own static loader to ensure that everything is loaded before attempting to process translation keys.
Sorry, I just figured it out. The InMemoryWebApiModule was intercepting the HTTP loader’s request. Thanks for the quick reply!