function views_plugin_localization::invoke_translation_process in Views (for Drupal 7) 6.3
Same name and namespace in other branches
- 7.3 plugins/views_plugin_localization.inc \views_plugin_localization::invoke_translation_process()
Invoke hook_translation_pre_process() or hook_translation_post_process().
Like node_invoke_nodeapi(), this function is needed to enable both passing by reference and fetching return values.
2 calls to views_plugin_localization::invoke_translation_process()
- views_plugin_localization::save in plugins/
views_plugin_localization.inc - Save string source for translation.
- views_plugin_localization::translate in plugins/
views_plugin_localization.inc - Translate a string / text with format
File
- plugins/
views_plugin_localization.inc, line 119 - Contains the base class for views localization plugins.
Class
- views_plugin_localization
- The base plugin to handle localization of Views strings.
Code
function invoke_translation_process(&$value, $op) {
$return = array();
$hook = 'translation_' . $op . '_process';
foreach (module_implements($hook) as $module) {
$function = $module . '_' . $hook;
$result = $function($value);
if (isset($result)) {
$return[$module] = $result;
}
}
return $return;
}