API page: https://api.drupal.org/api/drupal/modules!field!field.info.inc/function/...

// Hide language field display on marketing content type
   $instance = field_info_instance('node', 'language', 'marketing_content');

   if (!empty($instance)) {
     $instance['display']['default']['type'] = 'hidden';
     field_update_instance($instance);
   }

For some reason, hiding the 'language' field from display doesn't work when I do it programmatically, but if it's some other field, like field_custom_field, it works.

Comments

hcabalic’s picture

Title: Can't modify language field display setting programmatically » Can't programmatically modify display of language field
jhodgdon’s picture

Category: Bug report » Support request
Status: Active » Fixed

I don't think there is a field, per se, for node language. It's a property of the node, not a "Field". You'll need to program this some other way, like a form alter.

So... it looks like you may need some programming support.

I'm sorry, but although you can create issues in Drupal Core and mark the category as "support request", we don't really handle support requests in the Drupal Core issue queue as a regular practice (that option is mostly there for filing support issues for contributed modules and themes).

There are several support options listed if you click on "Support" at the top of Drupal.org, which will take you to:
http://drupal.org/support

There you can find out about the Drupal IRC channels, and the Forums, which are our two main support mechanisms in the Drupal community.

Good luck with your issue!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.