function uc_attribute_translate in Ubercart 6.2
Same name and namespace in other branches
- 7.3 uc_attribute/uc_attribute.module \uc_attribute_translate()
Translates an attribute.
Parameters
&$attribute: The attribute object to translate.
1 call to uc_attribute_translate()
- uc_attribute_load in uc_attribute/
uc_attribute.module - Loads an attribute from the database.
File
- uc_attribute/
uc_attribute.module, line 475
Code
function uc_attribute_translate(&$attribute) {
if (function_exists('i18nstrings')) {
$attribute->name = i18nstrings('uc_attribute:attribute:' . $attribute->aid . ':name', $attribute->name);
$attribute->label = i18nstrings('uc_attribute:attribute:' . $attribute->aid . ':label', $attribute->label);
$attribute->description = i18nstrings('uc_attribute:attribute:' . $attribute->aid . ':description', $attribute->description);
foreach ($attribute->options as &$option) {
$option->name = i18nstrings('uc_attribute:option:' . $option->oid . ':name', $option->name);
}
}
}