[6.x] Fix for empty fallback_locale - #34136
Conversation
|
I tried to update laravel version but I think this fix is not released yet. |
|
@ahmedsayedabdelsalam releases are done on Tuesdays. |
|
Great! Thanks. |
|
We've reverted this as this was a breaking change. |
|
Is there any plan to fix that or this is not an issue? |
|
This was the expected behavior and it's unlikely that we'll ever change this. |
|
Hmmm. Most of Excel Sheet Translation packages pull the not translated languages as an empty string value and I think it's logic because the data type for translations is designed to be strings For me I'll fix it in my project but I suggest making a config key determines when the translator should fallback if an empty strings or null. Like: 'fallback_when_empty' => true, // translations.php config file Anyway thanks for your time. |
// ar
'foo' => ''
// en
'foo', => 'bar'
before
trans('file.foo',[],'ar') // ''
after
trans('file.foo',[],'ar') // 'bar'
#34128