The documentation for Template Routes is pretty lamentable, so not a surprise you are having difficulties.
Each template can have only one route to it, and equally each route definition can only link to a single specific template.
It is not clear from your question whether you plan to link all routes of form /es/group/something
to the same template. If you do, you need to generalise the route definition to accept 'anything' in the third segment. Something like:
/es/group/{alpha_dash}
{alpha_dash}
is one of the constructs you can use in a route to tell EE what to accept in a segment (in this case alphabetic characters, 0 through 9, underscore, and dash
).
With this rule anything routing to /group/template_variable
would be unaffected, but the /es/
prefixed routes would only go to the template you put the route next to in the CP.
If you want a route to go to a specific (different) template depending on what is in segment 3 you'd need a different route instruction for each template - one for each template. So something like
route /es/group/dogs
-> to the spanish dogs template
route /es/group/cats
-> to the spanish cats template
As before, the /group/cats template etc. should continue to work fine with this route in place.
If you have multiple languages you can generalise these rules by replacing the /es/
with a more general rule for that segment. If all of the language flags are two letter, and you have no two-letter template groups something like this might work:
/{max_length[2]}/dogs
-> routes all URLs of form /xx/dogs to /dogs
HTH