Project

General

Profile

Revision 01f36513

Added by Assos Assos about 6 years ago

Weekly update of contrib modules

View differences:

drupal7/sites/all/modules/i18n/i18n_taxonomy/i18n_taxonomy.tokens.inc
15 15
    'name' => t("Name (localized)"),
16 16
    'description' => t("The name of the taxonomy term."),
17 17
  );
18
  $term['localized-name'] = array(
19
    'name' => t("Name in current language"),
20
    'description' => t("The name of the taxonomy term in current language."),
21
  );
18 22
  $term['i18n-description'] = array(
19 23
    'name' => t("Description (localized)"),
20 24
    'description' => t("The optional description of the taxonomy term."),
......
69 73
          $replacements[$original] = $sanitize ? check_plain($name) : $name;
70 74
          break;
71 75

  
76
        case 'localized-name':
77
          $translated_term = i18n_taxonomy_term_get_translation($term, $langcode);
78
          $name = i18n_taxonomy_term_name($translated_term, $langcode);
79
          $replacements[$original] = $sanitize ? check_plain($name) : $name;
80
          break;
81

  
72 82
        case 'i18n-description':
73 83
          $replacements[$original] = i18n_string_text(array('taxonomy', 'term', $term->tid, 'description'), $term->description, array('langcode' => $langcode, 'format' => $term->format, 'sanitize' => $sanitize, 'cache' => TRUE));
74 84
          break;

Also available in: Unified diff