You are here

function i18ntaxonomy_preprocess_forum_list in Internationalization 6

Translate forums list.

File

i18ntaxonomy/i18ntaxonomy.module, line 1047
i18n taxonomy module

Code

function i18ntaxonomy_preprocess_forum_list(&$variables) {
  $vid = variable_get('forum_nav_vocabulary', '');
  if (i18ntaxonomy_vocabulary($vid)) {
    foreach ($variables['forums'] as $id => $forum) {
      $variables['forums'][$id]->description = i18nstrings('taxonomy:term:' . $forum->tid . ':description', $forum->description);
      $variables['forums'][$id]->name = i18nstrings('taxonomy:term:' . $forum->tid . ':name', $forum->name);
    }
  }
}