Permalink
Browse files

minor #4815 Update translation.rst (ifdattic)

This PR was merged into the 2.5 branch.

Discussion
----------

Update translation.rst

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | 2.5
| Fixed tickets |

Commits
-------

93bc1bf Update translation.rst
  • Loading branch information...
wouterj committed Jan 16, 2015
2 parents bd7d246 + 93bc1bf commit 82bce299125247afea9b1fe65d7f0e5d40ed4fdd
Showing with 12 additions and 11 deletions.
  1. +12 −11 book/translation.rst
@@ -692,7 +692,7 @@ It will also detect the following translator usages in PHP templates:
$view['translator']->trans("Symfony2 is great");
$view['translator']->trans('Symfony2 is great');
$view['translator']->transChoice('Symfony2 is great', 1);
.. caution::
@@ -727,18 +727,19 @@ And suppose you've already setup some translations for the ``fr`` locale inside
</file>
</xliff>
.. code-block:: yaml
# src/Acme/AcmeDemoBundle/Resources/translations/messages.fr.yml
Symfony2 is great: J'aime Symfony2
.. code-block:: php
// src/Acme/AcmeDemoBundle/Resources/translations/messages.fr.php
return array(
'Symfony2 is great' => 'J\'aime Symfony2',
);
.. code-block:: yaml
# src/Acme/AcmeDemoBundle/Resources/translations/messages.fr.yml
Symfony2 is great: J'aime Symfony2
and for the ``en`` locale:
.. configuration-block::
@@ -758,18 +759,18 @@ and for the ``en`` locale:
</file>
</xliff>
.. code-block:: yaml
# src/Acme/AcmeDemoBundle/Resources/translations/messages.en.yml
Symfony2 is great: Symfony2 is great
.. code-block:: php
// src/Acme/AcmeDemoBundle/Resources/translations/messages.en.php
return array(
'Symfony2 is great' => 'Symfony2 is great',
);
.. code-block:: yaml
# src/Acme/AcmeDemoBundle/Resources/translations/messages.en.yml
Symfony2 is great: Symfony2 is great
To inspect all messages in the ``fr`` locale for the AcmeDemoBundle, run:
.. code-block:: bash

0 comments on commit 82bce29

Please sign in to comment.