For my translation of the application, I would like to use the language structure, for example:
- site.com (English)
- site.com/de/(German)
- site.com/fr/(france)
- site.com/nl/( Dutch)
etc..
I can do this easily with the router parameter in Literal as "[az] {2}", but I want to exclude languages ββthat I don't support, for example. site.com/it/, if it is not supported, I want 404. I tried to fix it with a regular expression (adding supported languages), but something (I donβt know) went wrong.
Thanks in advance!
'router' => array( 'routes' => array( 'home' => array( 'type' => 'Literal', 'options' => array( 'route' => '/', 'defaults' => array( 'controller' => 'Application\Controller\Index', 'action' => 'index', ), ), 'may_terminate' => true, 'child_routes' => array( 'language' => array( 'type' => 'Regex', 'options' => array( 'regex' => '/(?<lang>(de|fr|nl))?', 'defaults' => array( 'lang' => 'en',
source share