By zoon_unit on
I'm just beginning to learn PHP syntax and I keep running into source that I've never seen, and can't seem to find reference to the material in the PHP documentation.
I keep seeing this type of code in PHP snippet examples:
<?php
$form['preview'] = array(
'#type' => 'button',
'#value' => t('Preview'),
);
?>
What exactly is the t() function?? I have found no reference to it anywhere.
Comments
t()
Hi, take a look at Drupal API page on t():
t() function is part of Drupal
t() function is part of Drupal, you can read more about it here. In general you can look up core drupal functions on the drupal api home page
ahh, thanks!
That makes sense now. I didn't think to look at the API. Getting up to speed in PHP and how it's used in Drupal is pretty daunting, but at least now I know where to look when I run up on something unrecognizable.
these functions...
t() and l() are in common.inc.
Craig.