You are here

function _biblio_localize_fields in Bibliography Module 7

Same name and namespace in other branches
  1. 6.2 biblio.module \_biblio_localize_fields()
  2. 6 biblio.module \_biblio_localize_fields()
  3. 7.2 biblio.module \_biblio_localize_fields()

Translate field titles and hints through the interface translation system, if the i18nstrings module is enabled.

2 calls to _biblio_localize_fields()
biblio_form in ./biblio.module
Implements hook_form().
_biblio_field_extra_fields in includes/biblio.fields.inc

File

./biblio.module, line 37
Bibliography Module for Drupal.

Code

function _biblio_localize_fields(&$fields) {
  if (function_exists('i18n_string')) {
    foreach ($fields as $key => $row) {
      $fields[$key]['title'] = i18n_string("biblio:field:{$row['ftdid']}:title", $fields[$key]['title']);
      $fields[$key]['hint'] = i18n_string("biblio:field:{$row['ftdid']}:hint", $fields[$key]['hint']);
    }
  }
}