The entity_translation_languages() function should inherit the i18n language settings, in the case the entity at hand is a node and the i18n_node module is enabled.

There is some suggested code for that here #2339495-4: English language appears in list even if it is disabled and this issue should take care of implementing this functionality in the form of a proper patch.

And yes, this all started with a @todo :-)

/**
 * Returns the set of languages available for translations.
 */
function entity_translation_languages($entity_type = NULL, $entity = NULL) {
  if (isset($entity) && $entity_type == 'node' && module_exists('i18n_node')) {
    // @todo Inherit i18n language settings.
  }
  elseif (variable_get('entity_translation_languages_enabled', FALSE)) {
    $languages = language_list('enabled');
    return $languages[1];
  }
  return language_list();
}

Comments

stefanos.petrakis created an issue. See original summary.

stefanos.petrakis@gmail.com’s picture

Issue summary: View changes