Translate a JSON file using ngx-translate

1k Views Asked by At

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?

0

There are 0 best solutions below