Skip to content

Commit ef4dd23

Browse files
committed
add order of translation formats
The preferred order of the different translation formats in configuration blocks is Xliff, YAML, PHP. Thus, this has to be documented in the contributing section. Since the order being used before was Xliff, PHP, YAML, existing examples had to be modified accordingly.
1 parent 2b1935b commit ef4dd23

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

book/translation.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -136,18 +136,18 @@ different formats, XLIFF being the recommended format:
136136
</file>
137137
</xliff>
138138
139+
.. code-block:: yaml
140+
141+
# messages.fr.yml
142+
Symfony2 is great: J'aime Symfony2
143+
139144
.. code-block:: php
140145
141146
// messages.fr.php
142147
return array(
143148
'Symfony2 is great' => 'J\'aime Symfony2',
144149
);
145150
146-
.. code-block:: yaml
147-
148-
# messages.fr.yml
149-
Symfony2 is great: J'aime Symfony2
150-
151151
For information on where these files should be located, see
152152
:ref:`book-translation-resource-locations`.
153153

@@ -638,18 +638,18 @@ bundle.
638638
</file>
639639
</xliff>
640640
641+
.. code-block:: yaml
642+
643+
# validators.en.yml
644+
author.name.not_blank: Please enter an author name.
645+
641646
.. code-block:: php
642647
643648
// validators.en.php
644649
return array(
645650
'author.name.not_blank' => 'Please enter an author name.',
646651
);
647652
648-
.. code-block:: yaml
649-
650-
# validators.en.yml
651-
author.name.not_blank: Please enter an author name.
652-
653653
Translating Database Content
654654
----------------------------
655655

components/translation/usage.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,18 +127,18 @@ recommended format. These files are parsed by one of the loader classes.
127127
</file>
128128
</xliff>
129129
130+
.. code-block:: yaml
131+
132+
Symfony2 is great: J'aime Symfony2
133+
symfony2.great: J'aime Symfony2
134+
130135
.. code-block:: php
131136
132137
return array(
133138
'Symfony2 is great' => 'J\'aime Symfony2',
134139
'symfony2.great' => 'J\'aime Symfony2',
135140
);
136141
137-
.. code-block:: yaml
138-
139-
Symfony2 is great: J'aime Symfony2
140-
symfony2.great: J'aime Symfony2
141-
142142
.. sidebar:: Using Real or Keyword Messages
143143

144144
This example illustrates the two different philosophies when creating

contributing/documentation/standards.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ Configuration examples should show all supported formats using
8080
* **Configuration** (including services and routing): YAML, XML, PHP
8181
* **Validation**: YAML, Annotations, XML, PHP
8282
* **Doctrine Mapping**: Annotations, YAML, XML, PHP
83+
* **Translation**: XML, YAML, PHP
8384

8485
Example
8586
~~~~~~~

0 commit comments

Comments
 (0)