Replies: 1 comment 1 reply
-
You could try dependency injection: use Symfony\Component\Translation\TranslatorInterface;
class BaseBrick extends AbstractTemplateAreabrick
{
protected $translator;
public function __construct(TranslatorInterface $translator)
{
$this->translator = $translator;
}
} And then: $config->addItem([
'type' => 'relation',
'label' => $this->translator->trans('brick.label.geo-location'),
'name' => 'geopoint_relation',
'config' => [/*...*/],
]); It's not optimal, but in lieu of documentation it works :) |
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
-
Does anybody have an example which shows the best way to translate labels in the new getEditableDialogBoxConfiguration method?
Beta Was this translation helpful? Give feedback.
All reactions