You are here

function _content_taxonomy_localize_vocabulary in Content Taxonomy 6

Same name and namespace in other branches
  1. 6.2 content_taxonomy.module \_content_taxonomy_localize_vocabulary()

Localize a vocabulary by replacing its name attribute with its localized version for the current language.

Parameters

$vocabulary: The vocabulary to localize.

1 call to _content_taxonomy_localize_vocabulary()
content_taxonomy_field_settings in ./content_taxonomy.module
Implementation of hook_field_settings().

File

./content_taxonomy.module, line 489
Defines a field type for referencing a taxonomy term.

Code

function _content_taxonomy_localize_vocabulary(&$vocabulary) {

  // If this vocabulary supports localization.
  if (module_exists('i18ntaxonomy') && i18ntaxonomy_vocabulary($vocabulary->vid) == I18N_TAXONOMY_LOCALIZE) {
    $vocabulary->name = tt("taxonomy:vocabulary:{$vocabulary->vid}:name", $vocabulary->name);
  }
}