Closed ArmandArthur closed 7 years ago
This is normal as far as I know. Its not possible to extract labels from files where the data is dynamic. You need to implement Translation/TranslationContainerInterface which provides getTranslationMessages that the extractor will look for.
How i can acces to entity manager form getTranslationMessages, it's a static function..? thanks
If your labels are retrieved from a DB, I think you are expected to use other methods to provide them in a translated way. This is to translate the interface and static strings.
I'm not good in english but when i do:
$builder->addEventListener( FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($formModifier, $builder ) { $builder ->add('numero',TextType::class, array( 'label' => 'form.lot.numero' )) } ); it's works
and when i do
it nots works
as i do: $array = array('var','pour'); foreach($array as $key => $value) { $builder->add('numero1', TextType::class, array( 'label' => 'form.'.$value ));
}
it's don't work
it's normal ou it is a bug?