You are here

function i18ntaxonomy_locale_refresh in Internationalization 6

Refresh strings.

1 call to i18ntaxonomy_locale_refresh()
i18ntaxonomy_enable in i18ntaxonomy/i18ntaxonomy.install
Implementation of hook_enable().
1 string reference to 'i18ntaxonomy_locale_refresh'
i18ntaxonomy_locale in i18ntaxonomy/i18ntaxonomy.module
Implementation of hook_locale().

File

i18ntaxonomy/i18ntaxonomy.module, line 141
i18n taxonomy module

Code

function i18ntaxonomy_locale_refresh() {
  foreach (taxonomy_get_vocabularies() as $vid => $vocabulary) {
    if (empty($vocabulary->language)) {
      i18nstrings_update("taxonomy:vocabulary:{$vid}:name", $vocabulary->name);
      if ($vocabulary->help) {
        i18nstrings_update("taxonomy:vocabulary:{$vid}:help", $vocabulary->help);
      }
    }
    if (i18ntaxonomy_vocabulary($vid) == I18N_TAXONOMY_LOCALIZE) {
      foreach (taxonomy_get_tree($vid, 0) as $term) {
        i18nstrings_update("taxonomy:term:{$term->tid}:name", $term->name);
        if ($term->description) {
          i18nstrings_update("taxonomy:term:{$term->tid}:description", $term->description);
        }
      }
    }
  }
  return TRUE;

  // Meaning it completed with no issues
}