I've created my own cck boolean field 'Show author' to a custom node type. The node type has the default author fieldset by node.module, where you can set author and date. I want to show my own field in this fieldset.
By now I've simply moved the field and unset the old field:
$form['author']['field_show_author'] = $form['field_show_author'];
unset($form['field_show_author']);
Everything works fine; the field is displayed where I want it to, the value is saved properly.
But then locales.modules comes along and ruins everything! It uses field_info_instances() to loop through all fields, and since the field was unset it doesn't find the array index and fails.
So how do I move the custom cck field to the existing author fieldset without breaking locales? Can I specify that it is added there and not in the "root" of the form?
So I found a simple solution to the problem:
<?php
$form['field_show_author'] = array('language' => NULL);
?>
This seems to solve all problems.