Ver Mensaje Individual
  #2 (permalink)  
Antiguo 13/12/2015, 09:09
Avatar de cluster28
cluster28
 
Fecha de Ingreso: enero-2008
Ubicación: Donostia - San Sebastián
Mensajes: 756
Antigüedad: 16 años, 4 meses
Puntos: 32
Respuesta: symfony form traducciones

No has entendido bien el funcionamiento de este componente. Vuelve a leerlo:

http://symfony.com/doc/current/book/...ic-translation

Un fichero por cada idioma que quieres tener en la web y hay que poner los literales en "<source>", no un índice....

Código PHP:
Ver original
  1. $builder->add('code', 'text', array(
  2. 'label' => $this->get('translator')->trans('Literal');
  3. ));

Código HTML:
Ver original
  1. <trans-unit id="1">
  2.  <source>Literal</source>
  3. <target>Literal traducido</target>
  4. </trans-unit>