diff --git a/book/translation.rst b/book/translation.rst index ec103e2077a..62c12a9b98e 100644 --- a/book/translation.rst +++ b/book/translation.rst @@ -136,6 +136,11 @@ different formats, XLIFF being the recommended format: + .. code-block:: yaml + + # messages.fr.yml + Symfony2 is great: J'aime Symfony2 + .. code-block:: php // messages.fr.php @@ -143,11 +148,6 @@ different formats, XLIFF being the recommended format: '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`. @@ -638,6 +638,11 @@ bundle. + .. code-block:: yaml + + # validators.en.yml + author.name.not_blank: Please enter an author name. + .. code-block:: php // validators.en.php @@ -645,11 +650,6 @@ bundle. '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 ---------------------------- diff --git a/components/translation/usage.rst b/components/translation/usage.rst index fbb6664c607..6b57f74ff2c 100644 --- a/components/translation/usage.rst +++ b/components/translation/usage.rst @@ -127,6 +127,11 @@ recommended format. These files are parsed by one of the loader classes. + .. code-block:: yaml + + Symfony2 is great: J'aime Symfony2 + symfony2.great: J'aime Symfony2 + .. code-block:: php return array( @@ -134,11 +139,6 @@ recommended format. These files are parsed by one of the loader classes. '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 diff --git a/contributing/documentation/standards.rst b/contributing/documentation/standards.rst index 7cd44203034..7e888fd9796 100644 --- a/contributing/documentation/standards.rst +++ b/contributing/documentation/standards.rst @@ -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 ~~~~~~~