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.

Getting 404 Not Found for translation files.

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 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:closed
  • Created 7 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
elliotwesoffcommented, May 10, 2017

@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.

1reaction
elliotwesoffcommented, Feb 15, 2017

Sorry, I just figured it out. The InMemoryWebApiModule was intercepting the HTTP loader’s request. Thanks for the quick reply!

Read more comments on GitHub >

github_iconTop Results From Across the Web

i18next get 404 response when there is no translation file
If the browser language is English (United States) en-US I get the 404 Not Found error and then en is loaded.
Read more >
[Resolved] Main page 404 not found - WPML
If the content is translated to 100% and still leads to a 404 error on Front-End then go to Settings -> Permalinks and...
Read more >
Translate 404 Not Found Pages - ClickHelp
The default 404 pages can not be translated. Since the workflow is the same for both pages, we'll use Topic Not Found Page...
Read more >
Quick start for Document Translator returns 404 error
Hello, I tried to run the document translator with the quick start following these instructions https://docs.microsoft.com/de-de/azure/ ...
Read more >
404 Error after switching language | WordPress.org
You can try to resave them from WP Dashboard –> Settings –> Permalinks. The 404 error is treated also on our troubleshooting page...
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