My registered API via loadPath returns all translation keys in a nested "data" object.
i.e
{
"data": {
"key1": "foo",
"key2: "bar"
}
}
This forces me to use "data" like a namespace. i.e `t("data.mykey")". though it is not a namespace, it is just because I am not in control of the translation API.
Is there a way to always return a sub object of the JSON payload?
Lately I would like to use t("key1") instead of multiple t("data.key1") or t("data.key2").
My registered API via
loadPath
returns all translation keys in a nested "data" object. i.eThis forces me to use "data" like a namespace. i.e `t("data.mykey")". though it is not a namespace, it is just because I am not in control of the translation API.
Is there a way to always return a sub object of the JSON payload?
Lately I would like to use
t("key1")
instead of multiplet("data.key1")
ort("data.key2")
.