You are here

function tmgmt_available_languages in Translation Management Tool 7

Same name and namespace in other branches
  1. 8 tmgmt.module \tmgmt_available_languages()

Returns an array of languages that are available for translation.

Return value

array An array of languages in ISO format.

2 calls to tmgmt_available_languages()
tmgmt_job_form in ui/includes/tmgmt_ui.pages.inc
Entity API form the job entity.
tmgmt_ui_cart_content in ui/includes/tmgmt_ui.pages.inc
Form constructor for cart form.

File

./tmgmt.module, line 293
Main module file for the Translation Management module.

Code

function tmgmt_available_languages($exclude = array()) {
  $languages = entity_metadata_language_list();

  // Remove LANGUAGE_NONE and the language in $exclude from the list of
  // available languages and then apply a filter that only leaves the supported
  // target languages on the list.
  unset($languages[LANGUAGE_NONE]);
  foreach ($exclude as $item) {
    unset($languages[$item]);
  }
  return $languages;
}