Routing for controller with multilingual enabled 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;
}
The language is detected and the prefix removed before routing. So you have a static route without parameter and in the controller you can get the prefix from the language manager:

  $langcode = $this-&gt;languageManager()-&gt;getCurrentLanguage()-&gt;getId();