Skip to content

[Contributing][Documentation] add order of translation formats #4112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 16, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions book/translation.rst
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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