You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nothing. It just "This key does not have translation, so return nothing".
I create translations for RBAC items:
return [
'label.foo-read' => 'Foo label - it should be requred',
'description.foo-read' => 'Foo description - its optional.',
'label.boo-delete' => 'Boo',
// 'description.boo-delete' => 'Boo description is not necessary.',
];
Now I must set EventDispatcherInterface and catch exceptions or write dummy IF's like:
What steps will reproduce the problem?
Use Translator on not-existed key.
What is the expected result?
I want to decide when
translate()
should returnkey
ornull
.Throwing exception on missing translations is to complicated here.
I want to decide if given translate category return
null
on missing key or given TranlateInterface instance.Additional info
The text was updated successfully, but these errors were encountered: