disable translatable route object I've developed a module which generates and displays dynamic content.
The title of the page is also generated dynamically in the controller as show below:

if ($route = $request-&gt;attributes-&gt;get(\Symfony\Cmf\Component\Routing\RouteObjectInterface::ROUTE_OBJECT)) { 
  $route-&gt;setDefault('_title', strval($title))
}


This provoques each title is marked as untranslated text and fills the locales_source table. 

I tried to use this line to stop this

$route-&gt;setDefault('_disable_route_normalizer', TRUE)


but it doesn't work.

And I tried to use 

['#title' =&gt; $title]


and it doesn't work. 

How to avoid this?
Create a "title" function in your controller and declare it in your route, like here ( _title_callback):

entity.node_type.edit_form:
  path: '/admin/structure/types/manage/{node_type}'
  defaults:
    _entity_form: 'node_type.edit'
    _title_callback: '\Drupal\Core\Entity\Controller\EntityController::title'
  requirements:
    _permission: 'administer content types'