Skip to content

Commit

Permalink
minor #4815 Update translation.rst (ifdattic)
Browse files Browse the repository at this point in the history
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 82bce29
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions book/translation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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::

Expand Down Expand Up @@ -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::
Expand All @@ -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
Expand Down

0 comments on commit 82bce29

Please sign in to comment.