Drupal - multilingual site - change language - redirect to same page in selected langauge

On a multilingual Drupal site for custom modules (not nodes), what is the approach to ensuring that this user navigates to the same page in a new language?

example: ru / mypage for de / mypage

edit: The menu key 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'),         
  );

      

+2


a source to share


1 answer


Do you mean how to program a multilingual module? Well, I would say that you are using a placeholder in the menu path where you register your module (hook_menu). This way your module will receive the request no matter what language id is in use, so it will respond to en / mypage as well as de / mypage. Of course, in your module, you must add your own processing logic to deliver content to the requested language.



0


a source







All Articles