Skip to content

Commit a254b85

Browse files
committed
Rewords
1 parent dd8640e commit a254b85

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

validation/translations.rst

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,19 @@
44
How to Translate Validation Constraint Messages
55
===============================================
66

7-
If you're using validation constraints with the Form component, you can translate
8-
the error messages by creating a translation resource for the
9-
``validators`` :ref:`domain <translation-resource-locations>`.
7+
The validation constraints used in forms can translate their error messages by
8+
creating a translation resource for the ``validators``
9+
:ref:`translation domain <translation-resource-locations>`.
1010

11-
.. note::
11+
First of all, install the Symfony translation component (if it's not already
12+
installed in your application) running the following command:
1213

13-
In order to translate the error message, you should have installed the
14-
symfony/translation component with Composer.
14+
.. code-block:: terminal
1515
16-
To start, suppose you've created a plain-old-PHP object that you need to
17-
use somewhere in your application::
16+
$ composer require symfony/translation
17+
18+
Suppose you've created a plain-old-PHP object that you need to use somewhere in
19+
your application::
1820

1921
// src/Entity/Author.php
2022
namespace App\Entity;

0 commit comments

Comments
 (0)