3

With core's Locale module you can enable Multilingual support for a content type. When creating/editing a node, this gives you a Language select list with all enabled languages and "Language neutral" as options.

The default (resp. first) value for this select list is always "Language neutral".

Is it possible to have a certain language as default value instead?

At best it would be a per-content-type setting, but I'm fine with a global one, too (e.g. always using the site-wide default language as default value).

2

The option for it is available in admin/config/regional/entity_translation

  • The Entity Translation configuration page provide an interface to select default language for all content types separately

enter image description here

0

Of course you can do what you want. You should install the next module: internacionalization. This module will give you a better support for the content translation.

Instructions:

  1. You will have to enable the following modules in the packet internazionalization:

    • Internationalition module
    • String translation
    • Multilingual content.
  2. You will find in the content types a new vertical tab called multilingual settings. There you can configure the content type like you want.

0

We have different environments we push our configurations through, so I chose to codify this into the hook_enable() of one of my modules like this:

// Implements hook_enable().
function MY_MODULE_enable() {
    // Ensure that "entity translation" is setup so that my content item defaults to "EN" 
    // instead of "Language Neutral" @see /admin/config/regional/entity_translation
    if (module_exists('entity_translation')) {
        $variable_for_entity_trans_nodes = 'entity_translation_settings_node__CONTENT_TYPE';
        $trans_settings = variable_get($variable_for_entity_trans_nodes);
        $trans_settings['default_language'] = 'en';
        variable_set($variable_for_entity_trans_nodes, $trans_settings);
        watchdog("MY MODULE NAME", "Setting 'default_language' of '@variable' to 'en' at /admin/config/regional/entity_translation", array("@variable" => $variable_for_entity_trans_nodes), WATCHDOG_DEBUG);
    }
}

You'll need to update the things CAPITALIZED to suit.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.