You are here

function jalalidate_nodes_preprocess_comment in PersianTools 7

Implements hook_preprocess_comment().

File

jalalidate_nodes/jalalidate_nodes.module, line 25

Code

function jalalidate_nodes_preprocess_comment(&$variables) {
  global $language;
  if ($language->name == 'Persian') {
    $comment = $variables['elements']['#comment'];
    $variables['created'] = jalalidate_convert($comment->created);
    $variables['changed'] = jalalidate_convert($comment->changed);
    $variables['submitted'] = t('Submitted by !username on !datetime', array(
      '!username' => $variables['author'],
      '!datetime' => $variables['created'],
    ));
  }
}