Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latency when loading the website, because Translation Key appears when user opens our website #1467

Open
IbrahimALismail opened this issue Jan 11, 2024 · 1 comment

Comments

@IbrahimALismail
Copy link

Current behavior

There is latency happened when user open our website which Translation Key appears, but in localhost it woks great without latency so I do not know is the problem with server caching. After 8-15 seconds it disappear and works great and correct.

Expected behavior

The website should be opened for user without latency and without appearing Translation Key as the image below and this problem appears with all networks, devices, and browsers
IMG_CBC1B0E13740-1 2

How do you think that we should fix this?

Minimal reproduction of the problem with instructions

Environment


ngx-translate version: 14.0.0
Angular version: 15.2.0"

Versions:
   "@ngx-translate/core": "^14.0.0",
    "@ngx-translate/http-loader": "^7.0.0",
Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: XX  
- Platform:  

Others:

@CodeAndWeb
Copy link
Collaborator

Take a look at your network traffic in the browser - you should see then the translation file is loaded.

An option to prevent this from happening is by pre-loading one of the languages:

https://www.codeandweb.com/babeledit/tutorials/how-to-translate-your-angular-app-with-ngx-translate#ngx-translate-glitches

If you only have a low number of languages, you might also bundle them all directly in your app instead of using the http loader.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants