How can I get the locale in a typeform?
This is in my controller:
$form = $this->createForm(new ConfiguratorClientType(), $configuratorClient);
I have this in my form builder:
->add('language',
EntityType::class,
array(
'class' => 'CommonBundle:Language',
'choice_label' => function ($language) {
return $language->getName()[$locale];
},
'attr' => array(
'class' => 'form-control'
)
)
)
but I cant figure out how to get the locale in there.