Can not return translation in nested json #311
Unanswered
NaeemSohrabi
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Does not have any answer?? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi
i have a nested json like this in column home:
{
"tags": {
"en": [
"one",
"tow"
],
"fa": [
"اول"
]
},
"description": {
"en": "
lorem ipsum
","fa": "
لورم ایپسوم
"}
}
that the languages are in second level
and in my model , translatable is like this:
public $translatable = ['home.*'];
but it returns both fa and en languages.
in other columns that is like this:
{
"en": "lorem",
"fa": "الورم"
}
and in my model , translatable is like this:
public $translatable = ['title'];
translate works fine. , but in that case does not.
How should i use translate for that nested json????
please help
Thanks
Beta Was this translation helpful? Give feedback.
All reactions