Currently when new content is entered the language setting defaults to "Language Neutral".

This tends to cause problems in our translation assistant module when it comes to sending content for translation. Translations wont happen if the content is "Language Neutral" and this causes confusion for users.
What we intend to do is to include a setting in our module that will set the default language for new content. This will just set the initial state of the language selector and the user can still change to another language or language neutral if desired.

My questions are:
1) Is there a setting already existing for this?
2) Is this a good idea or should this be done in another way?
3) Should this be included in the i18n module?
Comments
locale
from locale module:
$form['language'] = array('#type' => 'select',
'#title' => t('Language'),
'#default_value' => (isset($form['#node']->language) ? $form['#node']->language : ''),
'#options' => array('' => t('Language neutral')) + locale_language_list('name'),
);
issue
included your request in this issue: http://drupal.org/node/311158
New module: Registration Language
Please have a look at this brand new module, the issues seem to me to be related:
Registration Language
http://drupal.org/project/reglang
hth
Frank
My LinkedIn profile
nice
After a quick check, as I see the module has no effect on the node form..
It does not alter the form, so the node language selection box is still set to Language neutral.
'#default_value' => (isset($form['#node']->language) ? $form['#node']->language : ''reglang
Hi,
thanks for the interest.
I think I did choose the wrong name for the module ;)
And I think I should address more language behavior with it. At first I only wanted to fix one bug. But I see there are many things that could be altered if the Drupal admin whishes for. I look into this and try to extend the moduel. May take some time but makes senes to put it in there.
--
comm-press |
I finally found some time. I
I finally found some time. I can't add this to my module because the translation core module will use "translation_form_alter" and add the fields. The reglang module will get a lower weight and can't access the data the translation module provides. To do this by a module you would need a module that is heavier than the translation module and alter the stuff it added to the form.
I think the patch is great but I fear it wouldn't be backportet. Should this implemented by a minimodule?
[edit]
I think I misunderstood the issue a bit if I think more about it. I will add a hook to node creation and let the admindecide to force a language for any language neutral contant. So I don't have to hook into the forms but to node creation.
--
comm-press |
thanks - I've added a
thanks - I've added a comment to http://drupal.org/node/311158 with a slight modification to the patch to get this to work.