How to configure the TranslatorAwareTreeRouteStack within Mezzio?

I want to use the TranslatorAwareTreeRouteStack within Mezzio to have local paths.

Does anyone know, how to configure this?

I have never tried this, but here is a suggestion.

Create and register/overwrite a factory for LaminasRouter in mezzio-laminasrouter and set the TranslatorAwareTreeRouteStack as constructor argument:

Define your routes with translatable segments:

Add the translations.

1 Like

Did you manage to do it? I can’t deal with this :slightly_frowning_face:

EDIT: I think I made it. It works, but I still need to test it. @froschdesign, thank you for your suggestion!