I’m building a new multilingual website with echo. The URL pattern of each resource is:
Apparently we can not use parameter as first part of an URI:
e.GET("/:lang/m/dashboard", controllers.Dashboard) -> 404 for /fr/m/dashboard | /en/m/dashboard
Wildcard does not work either, because:
/*/foo/bar matches anything
So is there a better way to handle this problem than copying routes for each language:
Note that the aims is not to get “lang” as parameter (a middleware extracts lang from URI and load translation) but not to have to copy route definition for each language.