You are here

function lingotek_get_projects in Lingotek Translation 6

1 call to lingotek_get_projects()
lingotek_admin_form in ./lingotek.admin.inc

File

./lingotek.api.inc, line 308

Code

function lingotek_get_projects() {
  global $_lingotek_client;
  $options = array();
  if (!$_lingotek_client
    ->canLogIn()) {
    return $options;
  }
  $list_projects = $_lingotek_client
    ->request("listProjects");
  if ($list_projects->results == "success") {
    foreach ($list_projects->projects as $project) {
      $options[$project->id] = t($project->name);
    }
  }
  return $options;
}