You are here

function entity_translation_languages in Entity Translation 7

Returns the set of languages available for translations.

7 calls to entity_translation_languages()
EntityTranslationDefaultHandler::entityFormLanguageWidget in includes/translation.handler.inc
entity_translation_add_access in ./entity_translation.module
Access callback.
entity_translation_admin_form in ./entity_translation.admin.inc
Builder function for the entity translation settings form.
entity_translation_edit_access in ./entity_translation.module
Access callback.
entity_translation_edit_title in ./entity_translation.module
Title callback.

... See full list

File

./entity_translation.module, line 1991

Code

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();
}