Skip to content

Commit 6a044b6

Browse files
committed
Merge branch '6.0' into 6.1
* 6.0: [Translation] Update locale.rst
2 parents 7b67cfc + b8ebd40 commit 6a044b6

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)