function uc_attribute_locale_refresh in Ubercart 6.2
Refreshes translated attribute and option strings.
1 string reference to 'uc_attribute_locale_refresh'
- uc_attribute_locale in uc_attribute/
uc_attribute.module - Implements hook_locale().
File
- uc_attribute/
uc_attribute.module, line 453
Code
function uc_attribute_locale_refresh() {
$attributes = db_query("SELECT aid, name, label, description FROM {uc_attributes}");
while ($attribute = db_fetch_object($attributes)) {
i18nstrings_update('uc_attribute:attribute:' . $attribute->aid . ':name', $attribute->name);
i18nstrings_update('uc_attribute:attribute:' . $attribute->aid . ':label', $attribute->label);
i18nstrings_update('uc_attribute:attribute:' . $attribute->aid . ':description', $attribute->description);
$options = db_query("SELECT oid, name FROM {uc_attribute_options} WHERE aid = %d", array(
$attribute->aid,
));
while ($option = db_fetch_object($options)) {
i18nstrings_update('uc_attribute:option:' . $option->oid . ':name', $option->name);
}
}
return TRUE;
}