function entity_translation_unified_form_get_other_languages in Entity Translation Unified Form 7
Helper function to get all languages, excluding current language.
2 calls to entity_translation_unified_form_get_other_languages()
- entity_translation_unified_form_node_form_submit in ./
entity_translation_unified_form.module - Form submission handler for node_form().
- entity_translation_unified_form_node_insert_other_language_fields in ./
entity_translation_unified_form.module - Add all enabled language fields for a single field.
File
- ./
entity_translation_unified_form.module, line 230 - Places entity translated fields inline in a single form.
Code
function entity_translation_unified_form_get_other_languages() {
global $language;
// Get the list of all languages.
$languages = language_list();
$other_languages = array();
// Add each enabled language, aside from the current language to an array.
foreach ($languages as $field_language_code => $field_language) {
if ($field_language->enabled && $field_language_code != $language->language) {
$other_languages[$field_language_code] = $field_language;
}
}
return $other_languages;
}