Hey @joao2, the solution for your case would require a similar workaround.
We've discussed this same topic on this other thread. Here you can see how David implemented the additional queries to modify the alternate_languages array to construct a new URL:
This is needed because the Route Resolver doesn't automatically return a route for alternate languages and get the resolved routes for each link in a language switcher.
We've opened a request to solve this, and it's already being tracked in the pipeline of the dev team.