function _drush_language_translations_get_language in Drush Language Commands 7
Returns a language object.
Parameters
string $langcode: Langcode.
Return value
object Language object.
3 calls to _drush_language_translations_get_language()
- drush_language_translations_export in ./
language_translations.drush.inc  - Export translations from one or more locale groups.
 - drush_language_translations_export_ng in ./
language_translations.drush.inc  - Exports .po file(s).
 - drush_language_translations_import in ./
language_translations.drush.inc  - Import translations to one or more locale groups.
 
File
- ./
language_translations.drush.inc, line 701  - Drush language commands related to translations.
 
Code
function _drush_language_translations_get_language($langcode) {
  // Ensure the langcode match an existing language.
  drupal_static_reset('language_list');
  $languages = language_list('language');
  // Return language object.
  if (isset($languages[$langcode])) {
    return $languages[$langcode];
  }
  drush_log(dt("drush language: langcode '" . $langcode . "' not installed . "), 'error');
}