On my Drupal 8 multilingual project, I have made a custom controller which create a basic page, but I can't figure out which parameter I must use in the routing. Is this _locale
?
This is the definition of the route.
custom.route:
path: '{_locale}/portail'
defaults:
_content: '\Drupal\my_module\Controller\DisplayController::display'
requirements:
_access: 'TRUE
This is the code I am using in the controller class.
public function display(Request $request, $locale) {
var_dump($locale);die;
}