forum_tid)) { $parents = array_reverse($parents); foreach ($parents as $parent) { $breadcrumb[] = l(i18n_taxonomy_term_name($parent), 'forum/' . $parent->tid); } } drupal_set_breadcrumb($breadcrumb); } } } /** * Translate forums list. */ function i18n_forum_preprocess_forum_list(&$variables) { $vid = variable_get('forum_nav_vocabulary', ''); if (i18n_taxonomy_vocabulary_mode($vid)) { foreach ($variables['forums'] as $id => $forum) { $variables['forums'][$id]->description = i18n_string('taxonomy:term:'. $forum->tid .':description', $forum->description); $variables['forums'][$id]->name = i18n_string('taxonomy:term:'. $forum->tid .':name', $forum->name); } } } /** * Translate forum page. */ function i18n_forum_preprocess_forums(&$variables) { $vid = variable_get('forum_nav_vocabulary', ''); if (i18n_taxonomy_vocabulary_mode($vid)) { if (isset($variables['links']['forum'])) { $variables['links']['forum']['title'] = i18n_string('nodetype:type:forum:post_button', 'Post new Forum topic'); } // This one is from advanced forum, http://drupal.org/project/advanced_forum if ($variables['forum_description']) { $variables['forum_description'] = i18n_string('taxonomy:term:'. $variables['tid'] .':description', $variables['forum_description']); } $vocabulary = taxonomy_vocabulary_load($vid); // Translate the page title. $title = !empty($vocabulary->name) ? i18n_taxonomy_vocabulary_name($vocabulary) : ''; drupal_set_title($title); // Translate the breadcrumb. $breadcrumb = array(); $breadcrumb[] = l(t('Home'), NULL); $breadcrumb[] = l($title, 'forum'); drupal_set_breadcrumb($breadcrumb); } }