function hook_translate

This function is called by the t() function, and gives modules a chance to intercept a string and change it. Meant primarily for translating to another language, but also good for simple replacements. Used by the Locale module.

NOTE: Since str is passed by reference, we don't need to return anything

File

includes/hook.api.php, line 1115
Lists all available hooks within FlightPath's core code.

Code

function hook_translate(&$str, $langcode = NULL) {
  // Ex:
  $str = str_replace("something", "something_else", $str);


  // Since str is passed by reference, we don't need to return anything

}