You are here

function __drush_exif_getlangcode in Exif 8

Same name and namespace in other branches
  1. 8.2 exif.drush.inc \__drush_exif_getlangcode()

Determine language based on $results.

File

./exif.drush.inc, line 453
Drush extension allowing to run some tasks related to exif.

Code

function __drush_exif_getlangcode($results) {
  if (isset($results['add_language'])) {
    $langcodes = $results['add_language'];
    $langcode = $langcodes[array_rand($langcodes)];
  }
  return $langcode;
}