You are here

function i18n_taxonomy_i18n_string_objects in Internationalization 7

Implements hook_i18n_string_objects()

File

i18n_taxonomy/i18n_taxonomy.i18n.inc, line 104
Internationalization (i18n) hooks

Code

function i18n_taxonomy_i18n_string_objects($type) {
  if ($type == 'taxonomy_term') {
    $terms = array();
    foreach (taxonomy_get_vocabularies() as $vid => $vocabulary) {
      if (isset($vocabulary->i18n_mode) && $vocabulary->i18n_mode & I18N_MODE_LOCALIZE) {
        foreach (taxonomy_get_tree($vid, 0) as $term) {
          $terms[] = $term;
        }
      }
    }
    return $terms;
  }
}