function webform_localization_node_load in Webform Localization 7.4
Same name and namespace in other branches
- 7 webform_localization.module \webform_localization_node_load()
Implements hook_node_load().
File
- ./
webform_localization.module, line 339 - Webform localization module.
Code
function webform_localization_node_load($nodes, $types) {
// Quick check to see if we need to do anything at all for these nodes.
$webform_types = webform_variable_get('webform_node_types');
if (count(array_intersect($types, $webform_types)) == 0) {
return;
}
foreach ($nodes as $nid => &$node) {
// Gets webform localization options that match this node ID.
$wl_options = webform_localization_get_config($nid);
if ($wl_options['expose_strings']) {
module_load_include('inc', 'webform_localization', 'includes/webform_localization.i18n');
// Translate custom strings.
webform_localization_translate_strings($node);
webform_localization_email_translate_strings($node);
}
}
}