We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9ecc3c5 commit 2748e2eCopy full SHA for 2748e2e
translation/locale.rst
@@ -85,6 +85,26 @@ A better policy is to include the locale in the URL using the
85
{
86
}
87
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
108
109
.. code-block:: yaml
110
0 commit comments