You are here

function _biblio_get_prefix in Bibliography Module 5

1 call to _biblio_get_prefix()
_biblio_parse_authors in ./biblio.module

File

./biblio.module, line 3261

Code

function _biblio_get_prefix(&$name) {
  $prefix = null;
  $name = " " . $name;
  $prefs = array(
    " Van ",
    " van ",
    " von ",
    " den ",
    " der ",
    " de ",
    " De ",
    " ter ",
    " Ter ",
    "Vander ",
  );
  if (strstr($name, " Van ")) {
    $prefix .= "Van ";
  }
  if (strstr($name, " van ")) {
    $prefix .= "van ";
  }
  if (strstr($name, " Vander ")) {
    $prefix .= "Vander ";
  }
  if (strstr($name, " von ")) {
    $prefix .= "von ";
  }
  if (strstr($name, " de ")) {
    $prefix .= "de ";
  }
  if (strstr($name, " De ")) {
    $prefix .= "De ";
  }
  if (strstr($name, " den ")) {
    $prefix .= "den ";
  }
  if (strstr($name, " der ")) {
    $prefix .= "der ";
  }
  if (strstr($name, " ter ")) {
    $prefix .= "ter ";
  }
  if (strstr($name, " Ter ")) {
    $prefix .= "Ter ";
  }
  if (strlen($prefix)) {
    $name = str_replace($prefs, " ", $name);
  }
  $name = trim($name);
  return $prefix;
}