function i18nsync_prepare_translation in Internationalization 6
Prepare node translation. Copy over sincronizable fields.
1 call to i18nsync_prepare_translation()
- i18nsync_nodeapi in i18nsync/
i18nsync.module - Implementation of hook_nodeapi().
File
- i18nsync/
i18nsync.module, line 228 - Internationalization (i18n) package. Synchronization of translations
Code
function i18nsync_prepare_translation(&$node, $source, $field_list) {
foreach ($field_list as $field) {
if (empty($source->{$field})) {
continue;
}
switch ($field) {
case 'taxonomy':
// Do nothing, this is handled by the i18ntaxonomy module
break;
default:
$node->{$field} = $source->{$field};
break;
}
}
}