我看到两条不同的路线
通常,国际化在页面上,但不在url上
让我明确一点,您保留您的url,并且在url中有一个参数,您知道页面的语言,因此
$routes['industry'] = array(
'route' => 'industry/:lang/:type',
'defaults' => array(
'module' => 'default',
'controller' => 'index',
'action' => 'branche',
'type' => 'car',
'lang' => 'en'
),
'reqs' => array(
'lang' => '(en|de)',
'type' => '(car|textile)'
)
);
更改url的另一种方法是:
$routes['industry'] = array(
'route' => ':industry/:type',
'defaults' => array(
'module' => 'default',
'controller' => 'index',
'action' => 'branche',
'type' => 'car',
'industry' => 'industry'
),
'reqs' => array(
'industry' => '(industry|branche)',
'type' => '(car|textile)'
)
);