Skip to content

Suddenly, the translation system doesn't work for new words, old words translate but not new ones??? #1143

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

Closed
nenadfemic opened this issue Nov 19, 2019 · 5 comments · May be fixed by #1557
Closed

Comments

@nenadfemic
Copy link

nenadfemic commented Nov 19, 2019

Suddenly, the translation system doesn't work for new words, old words translate good, but not new ones ???

What can be problem ?? I never face with such error so far, Old words can translate, but for new created words in json file, can not be translated, just show keywords, but not values

My settings in .json

"@ngx-translate/core": "^11.0.1",
"@ngx-translate/http-loader": "^4.0.0",

ionic version 4.12.0

Package Version

@angular-devkit/architect 0.13.7
@angular-devkit/build-angular 0.13.8
@angular-devkit/build-optimizer 0.13.8
@angular-devkit/build-webpack 0.13.8
@angular-devkit/core 7.3.7
@angular-devkit/schematics 7.3.7
@angular/cli 7.3.9
@angular/pwa 0.13.7
@ngtools/webpack 7.3.8
@schematics/angular 7.3.7
@schematics/update 0.13.9
rxjs 6.4.0
typescript 3.1.6
webpack 4.29.0

@nenadfemic nenadfemic changed the title Suddenly, the translation system doesn't work for new words, old words translate but not new ??? Suddenly, the translation system doesn't work for new words, old words translate but not new ones??? Nov 19, 2019
@nenadfemic
Copy link
Author

Also i am update node.js to latest version, but this not help

@ella33
Copy link

ella33 commented Nov 21, 2019

Maybe there's an error in your translation json file or if you have interpolation values, I have noticed that {{value}} does not work in the translation string, whereas {value} does. If you have the double brackets in the translation file, that could cause subsequent translation strings in the file to stop working.

@tomdev9
Copy link

tomdev9 commented Nov 29, 2019

Can you check network if .json file isnt cached and return old values? If is cached then try adding version or timestamp on the end of .json file. Something like this for useFactory
new TranslateHttpLoader(http, '/assets/i18n/', '.json?cb=' + version);

@aymen2709
Copy link

@tomastalian Thank you, your solution worked for me !

@esoubiran-aneo
Copy link

Hello there, this is a good solution, can we close this or do the documentation must be updated ?

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

Successfully merging a pull request may close this issue.

6 participants