function dt

8.0.x dt($string, $args = array())
6.x dt($string, $args = array())
7.x dt($string, $args = array())
3.x dt($string, $args = array())
4.x dt($string, $args = array())
5.x dt($string, $args = array())
master dt($string, $args = array())

Rudimentary replacement for Drupal API t() function.


string: String to process, possibly with replacement item.

array: An associative array of replacement items.

Return value

The processed string.

See also


Related topics

284 calls to dt()
core_drush_help in commands/core/
Implementation of hook_drush_help().
core_watchdog_format_result in commands/core/
Format a watchdog database row.
core_watchdog_query in commands/core/
Build a WHERE snippet based on given parameters.
docs_drush_help in commands/core/
Implementation of hook_drush_help().
DrushMakeProject::applyPatches in commands/make/
Retrieve and apply any patches specified by the makefile to this project.

... See full list

1 string reference to 'dt'
_drush_command_translate in includes/
Helper function for drush_command_translate().


includes/, line 145


function dt($string, $args = array()) {
  $output = NULL;
  if (function_exists('t') && drush_drupal_major_version() == ) {
    $output = t($string, $args);
  // The language system requires a working container which is built in DRUPAL_BOOTSTRAP_KERNEL phase.
  else if (drush_drupal_major_version() >=  && function_exists('drupal_get_bootstrap_phase') && drupal_get_bootstrap_phase() >= DRUPAL_BOOTSTRAP_KERNEL) {
    $output = t($string, $args);
  else if (function_exists('t') && drush_drupal_major_version() <=  && function_exists('theme')) {
    $output = t($string, $args);

  // If Drupal's t() function unavailable.
  if (!isset($output)) {
    if (!empty($args)) {
      $output = strtr($string, $args);
    else {
      $output = $string;
  return $output;