10000 [#3188] Fixing a bad merge at sha: ba770f2eb8d42ce525b9c85bf25356cd4b… · symfony/symfony-docs@5be1895 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5be1895

Browse files
committed
[#3188] Fixing a bad merge at sha: ba770f2
1 parent ba770f2 commit 5be1895

File tree

1 file changed

+1
-47
lines changed

1 file changed

+1
-47
lines changed

book/translation.rst

Lines changed: 1 addition & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ texts* and complex expressions:
306306
templates (in order to avoid side effects).
307307

308308
.. 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
310310

311311
PHP Templates
312312
~~~~~~~~~~~~~
@@ -525,52 +525,6 @@ the framework:
525525
originally, however, as of 2.1 this has been moved. This is because the
526526
locale is now set on the request instead of the session.
527527

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-
574528
.. _book-translation-constraint-messages:
575529

576530
Translating Constraint Messages

0 commit comments

Comments
 (0)
0