function biblio_locale_refresh_fields in Bibliography Module 6.2
Same name and namespace in other branches
- 6 biblio.module \biblio_locale_refresh_fields()
- 7 biblio.module \biblio_locale_refresh_fields()
- 7.2 biblio.module \biblio_locale_refresh_fields()
Refreshes all translatable field strings.
Parameters
integer $tid: (optional) Biblio publication type ID whose field strings are to be refreshed. If not specified, strings for all fields will be refreshed. The default value is NULL.
2 calls to biblio_locale_refresh_fields()
- biblio_admin_types_edit_form_submit in includes/
biblio.admin.inc - biblio_locale in ./
biblio.module - Implements hook_locale().
File
- ./
biblio.module, line 177 - Main file for Drupal module biblio.
Code
function biblio_locale_refresh_fields($tid = NULL) {
if (module_exists('i18nstrings')) {
if (isset($tid)) {
$result = db_query('SELECT d.* FROM {biblio_field_type} b INNER JOIN {biblio_field_type_data} d ON b.ftdid = d.ftdid WHERE tid = %d', $tid);
}
else {
$result = db_query('SELECT * FROM {biblio_field_type_data}');
}
while ($row = db_fetch_array($result)) {
tt("biblio:field:{$row['ftdid']}:title", $row['title'], NULL, TRUE);
tt("biblio:field:{$row['ftdid']}:hint", $row['hint'], NULL, TRUE);
}
}
}