How to exclude certain variable from the Feature code? In my Feature I wanted to add the multilingual path_breadcrumbs_home_link_title for en and de, but when generating the feature by including the realm_variables there is the site_name and site_slogan in the en array included too.

The site_name is a mandatory field, so I can not just leave it empty.

The generate file looks like this:

&lt;?php

/**
 * Implements hook_variable_realm_default_variables().
 */
function foo_variable_realm_default_variables() {
  $realm_variables = array();
  $realm_variables['language']['de'] = array(
    'path_breadcrumbs_delimiter' =&gt; '»',
    'path_breadcrumbs_home_link_title' =&gt; 'Startseite',
  );
  $realm_variables['language']['en'] = array(
    'path_breadcrumbs_delimiter' =&gt; '»',
    'path_breadcrumbs_home_link_title' =&gt; 'Home',
    'site_name' =&gt; 'Demo Site',
    'site_slogan' =&gt; '',
  );
  return $realm_variables;
}


The site name would overwrite all the site names of any already deployed Drupal site.

I don't understand why it doesn't appear in the de array even while site name is set there too.

How can I get rid of this?

Any workarounds?
The hook_features_export_alter would allow you to alter the final array of Component names to be exported, just prior to the rendering of defaults.

This allows feature modules a final say in whether or not certain Components are exported.

However the Components' actual data cannot be altered by this hook, so I'm not sure if that actually helps.

Example:

function hook_features_export_alter(&amp;$export, $module_name) {
  // Example: do not allow the page content type to be exported, ever.
  if (!empty($export['features']['node']['page'])) {
    unset($export['features']['node']['page']);
  }
}