costa costa - 14 days ago 7
PHP Question

Zend translated routes

I have multiple routes for different locales:

Example:

Route for /de

$routes['industry'] = array(
'route' => 'branche/:type',
'defaults' => array(
'module' => 'default',
'controller' => 'index',
'action' => 'branche',
'type' => 'automobil'
),
'reqs' => array(
'type' => '(automobil|textil)'
)
);


Route for /en

$routes['industry'] = array(
'route' => 'industry/:type',
'defaults' => array(
'module' => 'default',
'controller' => 'index',
'action' => 'branche',
'type' => 'car'
),
'reqs' => array(
'type' => '(car|textile)'
)
);


Its possible somehow to have just one route instead of 2 on this case?

Note is not just the route which changes, also the type on the reqs and the default type.

Answer
Comments