I have made translation that works, but text is changing only in one html component. Imports are correct, because I can use | translate method in differents components. Problem is with getting values from JSON file in other components. When I am writing {{'keyValue.textForReplacing'|translate}}
my text appears like keyValue.textForReplacing. It is not imported from JSON file. What's more, I can use all my key: values objects from JSON file only in one html component.
I have used this as an example https://github.com/ngx-translate/core
答案 0 :(得分:0)
尝试{{keyValue.textForReplacing | translate}}