public function views_plugin_localization::invoke_translation_process in Views (for Drupal 7) 7.3
Same name and namespace in other branches
- 6.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 136 - Definition of views_plugin_localization.
Class
- views_plugin_localization
- The base plugin to handle localization of Views strings.
Code
public 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;
}