@@ -306,7 +306,7 @@ texts* and complex expressions:
306
306
templates (in order to avoid side effects).
307
307
308
308
.. versionadded :: 2.1
309
- The ``trans_default_domain `` tag is new in Symfony2 .1
309
+ The ``trans_default_domain `` tag is new in Symfony 2 .1
310
310
311
311
PHP Templates
312
312
~~~~~~~~~~~~~
@@ -525,52 +525,6 @@ the framework:
525
525
originally, however, as of 2.1 this has been moved. This is because the
526
526
locale is now set on the request instead of the session.
527
527
528
- PHP Templates
529
- ~~~~~~~~~~~~~
530
-
531
- The translator service is accessible in PHP templates through the
532
- ``translator `` helper:
533
-
534
- .. code-block :: html+php
535
-
536
- <?php echo $view['translator']->trans('Symfony2 is great') ?>
537
-
538
- <?php echo $view['translator']->transChoice(
539
- '{0} There is no apples|{1} There is one apple|]1,Inf[ There are %count% apples',
540
- 10,
541
- array('%count%' => 10)
542
- ) ?>
543
-
544
- Forcing the Translator Locale
545
- -----------------------------
546
-
547
- When translating a message, Symfony2 uses the locale from the current request
548
- or the ``fallback `` locale if necessary. You can also manually specify the
549
- locale to use for translation::
550
-
551
- $this->get('translator')->trans(
552
- 'Symfony2 is great',
553
- array(),
554
- 'messages',
555
- 'fr_FR'
556
- );
557
-
558
- $this->get('translator')->transChoice(
559
- '{0} There are no apples|{1} There is one apple|]1,Inf[ There are %count% apples',
560
- 10,
561
- array('%count%' => 10),
562
- 'messages',
563
- 'fr_FR'
564
- );
565
-
566
- Translating Database Content
567
- ----------------------------
568
-
569
- The translation of database content should be handled by Doctrine through
570
- the `Translatable Extension `_. For more information, see the documentation
571
- for that library.
572
- >>>>>>> 2300a74000deafb340921eec2310a399be8d5a25
573
-
574
528
.. _book-translation-constraint-messages :
575
529
576
530
Translating Constraint Messages
0 commit comments