Default language for new content

Events happening in the community are now at Drupal community events on www.drupal.org.
brucepearson's picture

Currently when new content is entered the language setting defaults to "Language Neutral".
Only local images are allowed.

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.
Only local images are allowed.

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

pasqualle's picture

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'),
          );
  1. as you can see, no settings
  2. yes, good idea
  3. you should file a new issue for D7 core, but I do not believe that it will be backported to D6.

issue

pasqualle's picture

included your request in this issue: http://drupal.org/node/311158

New module: Registration Language

frank ralf's picture

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

nice

pasqualle's picture

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

kars-t's picture

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.

I finally found some time. I

kars-t's picture

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.

thanks - I've added a

brucepearson's picture

thanks - I've added a comment to http://drupal.org/node/311158 with a slight modification to the patch to get this to work.

Internationalization

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week