function scald_type_property_translate in Scald: Media Management made easy 7
Returns a translated property of a Scald atom type.
Parameters
object $type: The Scald atom type for which to return a translated property.
string $property: Either 'title' or 'description'. Defaults to 'title'.
string $langcode: Optional language code for the translation. Defaults to the current language.
Return value
string The translated property.
8 calls to scald_type_property_translate()
- scald_admin_dashboard in includes/
scald.admin.inc - The Scald Admin Dashboard.
- scald_atom_add in includes/
scald.pages.inc - Creates the page listing possible Scald Atom Types.
- scald_atom_add_form_options_submit in includes/
scald.pages.inc - Handles the final atom creation step form submission.
- scald_atom_delete_confirm_submit in includes/
scald.pages.inc - Execute atom deletion.
- scald_audio_scald_add_form in modules/
providers/ scald_audio/ scald_audio.module - Implements hook_scald_add_form().
File
- ./
scald.module, line 2306 - The Scald Core, which handles all Scald Registries and dispatch.
Code
function scald_type_property_translate($type, $property = 'title', $langcode = NULL) {
$name = array(
'scald',
'type',
$type->type,
$property,
);
$string = $type->{$property};
$options = $langcode ? array(
'langcode' => $langcode,
) : array();
return scald_string_translate($name, $string, $options);
}