Skip to content

Commit 2748e2e

Browse files
mohamedGasmiijaviereguiluz
authored andcommitted
[Translation] Update locale.rst
1 parent 9ecc3c5 commit 2748e2e

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

translation/locale.rst

+20
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,26 @@ A better policy is to include the locale in the URL using the
8585
{
8686
}
8787
}
88+
89+
.. code-block:: php-attributes
90+
91+
// src/Controller/ContactController.php
92+
namespace App\Controller;
93+
94+
// ...
95+
class ContactController extends AbstractController
96+
{
97+
#[Route(
98+
path: '/{_locale}/contact',
99+
name: 'contact',
100+
requirements: [
101+
'_locale' => 'en|fr|de',
102+
],
103+
)]
104+
public function contact()
105+
{
106+
}
107+
}
88108
89109
.. code-block:: yaml
90110

0 commit comments

Comments
 (0)