Created
September 30, 2010 21:26
-
-
Save gavinblair/605351 to your computer and use it in GitHub Desktop.
Multilingual Module Pages in Drupal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function mymodule_menu(){ | |
$languages = language_list('enabled'); | |
$items = array(); | |
foreach ($languages[1] as $lang) { | |
$items[t('my_path', array(), $lang->language)] = array( | |
'title' => t('Page Title', array(), $lang->language), | |
'page callback' => 'pagefunction', | |
'access arguments' => array('access content'), | |
'type' => MENU_NORMAL_ITEM | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Menu items (in each language) seem to show up no matter what language you're in. Can't specify language of menu items created with hook_menu(), and even manually changing it doesn't do anything.