'Translate a JSON file using ngx-translate

I have a JSON file with static data that I want to translate it.

{
            "id": "",
            "name": "text",
            "label": "Text",
            "value": "Some random text"
}

So I want to save my static texts to i18n files and then load them in selected language. I tried something like

{
                "id": "",
                "name": "text",
                "label": "{{ json.text | translate }}",
                "value": "{{ json.someRandomText | translate }}"


}

Any suggestion?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source