Hard
I want a menu item to be translatable in good practice. How do I code this menu item in my module?
Author: Leon CrosStatus: PublishedQuestion passed 54 times
Edit
0
Community Evaluations
Auteur anonyme
04/12/2024
function beautiful_menu() {
$items['admin/config/media/beautiful'] = array(
'title' => t('Beautiful Configuration'),
'description' => t('Configure the Beautiful module.'),
'page callback' => 'beautiful_settings',
'access arguments' => array('administer Beautiful module'),
'file' => 'beautiful.admin.inc',
);
return $items;
}
✔️ Recommandé (Meilleure option) :
Les chaînes sont enveloppées dans t() et écrites en anglais, qui est la langue par défaut de Drupal.
Cela facilite la traduction dans d'autres langues via l'interface de traduction de Drupal.
Respecte les bonnes pratiques de localisation.
0
I've developed a custom module *mymodule* and I'm using the theme *beautifullyon* that I've developed from Zen. To intervene as late as possible in the page creation process, which of the following functions should I code?0
How to translate a string in Drupal0
Where should I place my *beautifullyon* theme to follow best practices?0
Uninstall a deactivated module in Drupal70
What is a text format in Drupal?0
Create a link to *mybeautifulsite.fr* following best practices, in my module's code.0
What is a node in Drupal?