I'm building a newsletter subscription form in Symfony2. In this form these is a field where users can select there language. In this example I set it default to NL. But how can I get the active (user selected locate on the platform) locate value and use it here?
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add('email', 'text')
->add('langId', 'choice', array(
'translation_domain' => 'messages',
'choices' => array(
'NL' => 'dutch',
'EN' => 'english',
'DE' => 'german',
),
'data' => 'NL'
))
->add('save', 'submit');
}