You are here

function drush_drush_language_language_add in Drush Language Commands 8

Add a language.

File

./drush_language.drush.inc, line 98
Drush (< 9) integration for the drush_language module.

Code

function drush_drush_language_language_add() {
  $args = func_get_args();
  if (count($args) == 0) {
    return drush_set_error('DRUSH_LANGUAGE', dt('Please provide one or more language codes as arguments.'));
  }
  $langcodes = explode(',', $args[0]);
  \Drupal::service('drush_language.cli')
    ->add(new Drush8Io(), 'dt', $langcodes);
}