0

Is there an easy way to adjust a local translation strategy for a field added to a listMapper? So the column header will be shown exactly how it's been written in a label attribute without any gaps.

BusinessUserAdmin.php

protected function configureListFields(ListMapper $listMapper)
{
    $listMapper
        ->add('company', null, [
            'label' => 'Company'
        ])
}

This is how it looks like now:

    'label' => 'Company'       'label' => 'COmpany'       'label' => 'COMPANY'

   Company     COmpany       COMPANY

genesst
  • 1,333
  • 1
  • 10
  • 39

1 Answers1

1

When you register your admin class as service and tag it with : sonata.admin, there is additional option label_translator_strategy="sonata.admin.label.strategy.underscore”

You can find more info here :

https://sonata-project.org/bundles/admin/master/doc/reference/translation.html

kunicmarko20
  • 2,095
  • 2
  • 15
  • 25