Lang::has() returns false for JSON translation if translated value is the same as original value #39798
Replies: 1 comment
-
This should already been fixed: #47582 |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
This is the `Lang::has()' method:
It simply checks if the translated value is different from the original value. If no, it assumes that there is a translation.
This works well for array based translation files, but not for JSON files. E.g. "Email" could be also "Email" in German.
Lang::has('Email', 'de')
will returnfalse
although the translation is contained inde.json
.Is
Lang::has()
supposed to work only with array based translations?Extending the method to the following would solve the issue:
Thanks for your thoughts,
Sebastian
Beta Was this translation helpful? Give feedback.
All reactions