Get translated country name from a 2 digit country code in Symfony2/Twig?
问题 I'm using the Symfony2 country Field Type, it works well and country names are translated. I am storing the two-digit country code in the column country of my entity. How can I display the full, translated country name? This is how I added the field to the form: $builder ->add('country', 'country', array( 'label' => 'Paese', 'preferred_choices' => array('IT') )); And then in my controller: $user = $this->getDoctrine()->getRepository('AcmeHelloBundle:User'); $countryCode = $user->getCountry();