Skip to content

Commit

Permalink
minor #4112 [Contributing][Documentation] add order of translation fo…
Browse files Browse the repository at this point in the history
…rmats (xabbuh)

This PR was merged into the 2.3 branch.

Discussion
----------

[Contributing][Documentation] add order of translation formats

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

Commits
-------

ef4dd23 add order of translation formats
  • Loading branch information
weaverryan committed Aug 16, 2014
2 parents 650120a + ef4dd23 commit 03fcab1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
20 changes: 10 additions & 10 deletions book/translation.rst
Expand Up @@ -136,18 +136,18 @@ different formats, XLIFF being the recommended format:
</file>
</xliff>
.. code-block:: yaml
# messages.fr.yml
Symfony2 is great: J'aime Symfony2
.. code-block:: php
// messages.fr.php
return array(
'Symfony2 is great' => 'J\'aime Symfony2',
);
.. code-block:: yaml
# messages.fr.yml
Symfony2 is great: J'aime Symfony2
For information on where these files should be located, see
:ref:`book-translation-resource-locations`.

Expand Down Expand Up @@ -638,18 +638,18 @@ bundle.
</file>
</xliff>
.. code-block:: yaml
# validators.en.yml
author.name.not_blank: Please enter an author name.
.. code-block:: php
// validators.en.php
return array(
'author.name.not_blank' => 'Please enter an author name.',
);
.. code-block:: yaml
# validators.en.yml
author.name.not_blank: Please enter an author name.
Translating Database Content
----------------------------

Expand Down
10 changes: 5 additions & 5 deletions components/translation/usage.rst
Expand Up @@ -127,18 +127,18 @@ recommended format. These files are parsed by one of the loader classes.
</file>
</xliff>
.. code-block:: yaml
Symfony2 is great: J'aime Symfony2
symfony2.great: J'aime Symfony2
.. code-block:: php
return array(
'Symfony2 is great' => 'J\'aime Symfony2',
'symfony2.great' => 'J\'aime Symfony2',
);
.. code-block:: yaml
Symfony2 is great: J'aime Symfony2
symfony2.great: J'aime Symfony2
.. sidebar:: Using Real or Keyword Messages

This example illustrates the two different philosophies when creating
Expand Down
1 change: 1 addition & 0 deletions contributing/documentation/standards.rst
Expand Up @@ -80,6 +80,7 @@ Configuration examples should show all supported formats using
* **Configuration** (including services and routing): YAML, XML, PHP
* **Validation**: YAML, Annotations, XML, PHP
* **Doctrine Mapping**: Annotations, YAML, XML, PHP
* **Translation**: XML, YAML, PHP

Example
~~~~~~~
Expand Down

0 comments on commit 03fcab1

Please sign in to comment.