The "to" portion of your array is confusing it. It expects the classname::methodname of the class/method handling that route. In your case it thinks the language codes are the name of the method, not
specials which is what I'm assuming is the actual method?
If you need the language code used in the method, you could write it like this:
```
$routes->get('en/specials/{:any}', 'Products::index/specials/en/$1');
```
The language code is the first parameter sent and the name/id/whatever of the special is the second parameter. If you're only using the language code during a controller filter to set something site-wide, you could ignore that altogether and just pass in $1.
A couple words of warning here.
1. Don't use
add as the method. Instead, use the correct HTTP verbs (get, post, etc). It's more flexible and safer. If you need to match both get and post, use
match(['get', 'post']...).
2. You might get something unexpected using
(:any) now. Unlike in CI3,
any will accept...well, anything, not just a single segment. If your special codes have a forward slash in them sometimes, then "any" is correct. If you need to handle other segments after that, though, use
(
egment) instead.