How can i get single value of key in specific language (not in currently selected language) in template?
You can use the service.
Try for example:
translate.getTranslation(lang).subscribe((translationObj) => {
console.log(translationObj[key]);
});
getTranslation also changes the current language
getTranslation also changes the current language
"use" does but not getTranslation. I faced the same issue and getTranslation did the trick for me
@phoude https://stackoverflow.com/questions/50706158/angular-ngx-translate-gettranslation-issue
It mentions the issue from @FrankGoortani
try this: https://www.npmjs.com/package/ngx-translate-in
{{'key' | translateIn: "fr" | async}}
This has the great disadvantage of fetching the entire language file in case case you retrieve languages per GET.
Most helpful comment
@phoude https://stackoverflow.com/questions/50706158/angular-ngx-translate-gettranslation-issue
It mentions the issue from @FrankGoortani