Jump to Navigation

011 - The t() Function

t() is the translation function. It is used to provide multi-language support and also provide a standard method of string substitution. When t() is called, Drupal will check to see if the user's preference language is other than the default(US English). If the user prefers another language, and that language is supported, then Drupal will attempt to translate the string into the user's preferred language.


t('Trying to access !url.', array('!url'=>'http://example.com'));

Main menu 2

Story | by Dr. Radut