You are here

function _content_taxonomy_localize_vocabulary in Content Taxonomy 6.2

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

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


$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().


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


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);