Contributions API

i18ntaxonomy_locale_refresh

Definition

i18ntaxonomy_locale_refresh()
contributions/i18n/i18ntaxonomy/i18ntaxonomy.module, line 129

Description

Refresh strings

Code

<?php
function i18ntaxonomy_locale_refresh() {
  foreach (taxonomy_get_vocabularies() as $vid => $vocabulary) {
    if (i18ntaxonomy_vocabulary($vid) == I18N_TAXONOMY_LOCALIZE) {
      tt("taxonomy:vocabulary:$vid:name", $vocabulary->name, NULL, TRUE);
      if ($vocabulary->help) {
        tt("taxonomy:vocabulary:$vid:help", $vocabulary->help, NULL, TRUE);
      }
      foreach (taxonomy_get_tree($vid, 0) as $term) {
        tt("taxonomy:term:$term->tid:name", $term->name, NULL, TRUE);
        if ($term->description) {
          tt("taxonomy:term:$term->tid:description", $term->description, NULL, TRUE);
        }
      }
    }
  }  
}
?>