function dt
| 6.x output.inc | dt($string, $args = array()) |
| 5.x output.inc | dt($string, $args = array()) |
| 3.x drush.inc | dt($string, $args = array()) |
| 4.x drush.inc | dt($string, $args = array()) |
Rudimentary replacement for Drupal API t() function.
Parameters
string: String to process, possibly with replacement item.
array: An associative array of replacement items.
Return value
The processed string.
See also
t()
Related topics
204 calls to dt()
- core_cli_bashrc in commands/
core/ core.drush.inc - core_drush_help in commands/
core/ core.drush.inc - Implementation of hook_drush_help().
- core_watchdog_format_result in commands/
core/ watchdog.drush.inc - Format a watchdog database row.
- core_watchdog_query in commands/
core/ watchdog.drush.inc - Build a WHERE snippet based on given parameters.
- docs_drush_help in commands/
core/ docs.drush.inc - Implementation of hook_drush_help().
1 string reference to 'dt'
- _drush_command_translate in includes/
command.inc - Helper function for drush_command_translate().
File
- includes/
drush.inc, line 638 - The drush API implementation and helpers.
Code
function dt($string, $args = array()) {
if (function_exists('t')) {
return t($string, $args);
}
else {
if (!empty($args)) {
return strtr($string, $args);
}
else {
return $string;
}
}
}