Drupal - multilingual site - change language - redirect to same page in selected language
In a Drupal multilingual site, for custom modules, (not nodes) what is approach to assure that user navigates to same page in new language?
example: en/mypage to de/mypage
edit: menu hook looks like this:
// add menu item
$items['my_module_name'] = array(
'title' 开发者_开发技巧 => t('My Page Title'),
'menu_name' => 'menu-my-menu',
'page callback' => 'call_this_function_below',
'access arguments' => array('access content'),
);
You mean how to program a module with multilanguage support? Well, I would say you use a placeholder in the menu path you are registering your module for (hook_menu). In that way your module will get the request no matter what language identifier is used, so it will react for en/mypage as well as de/mypage. Of course in your module you must add custom processing logic to deliver the content in the requested language.
精彩评论