function language_drush_command in Drush Language Commands 7
Implementation of hook_drush_command().
@See drush_parse_command() for a list of recognized keys.
Return value
array An associative array describing your command(s). An associative array describing your command(s).
File
- ./
language.drush.inc, line 17 - Drush commands allowing languages to be added, switched, enabled, disabled, imported, exported and update prefix from the commandline. This module only provides drush commands, so you will see no functionality in the UI.
Code
function language_drush_command() {
$commands = array();
// Language commands.
$commands['language-add'] = array(
'description' => "Add and import a new language definition",
'arguments' => array(
'langcode' => 'The langcode of the language for which a definition will be added.',
),
'aliases' => array(
'langadd',
),
'drupal dependencies' => array(
'locale',
),
);
$commands['language-enable'] = array(
'description' => "Enable an already defined language",
'arguments' => array(
'langcode' => 'The langcode of the language which will be enabled.',
),
'aliases' => array(
'langen',
),
'drupal dependencies' => array(
'locale',
),
);
$commands['language-disable'] = array(
'description' => "Disable an already defined language",
'arguments' => array(
'langcode' => 'The langcode of the language which will be disabled.',
),
'aliases' => array(
'langdis',
),
'drupal dependencies' => array(
'locale',
),
);
$commands['language-default'] = array(
'description' => "Assign an enabled language as default",
'arguments' => array(
'langcode' => 'The langcode of the language which will be set as the default language.',
),
'aliases' => array(
'langdef',
),
'drupal dependencies' => array(
'locale',
),
);
$commands['language-prefix'] = array(
'description' => "Alter language prefix",
'arguments' => array(
'langcode' => 'The langcode of the language.',
'prefix' => 'The prefix of the language. Prefix is optional, if not provide the command will remove the prefix',
),
'aliases' => array(
'langpref',
),
'drupal dependencies' => array(
'locale',
),
);
return $commands;
}