function locale_variable_info in Variable 7
Same name and namespace in other branches
- 7.2 includes/locale.variable.inc \locale_variable_info()
Implements hook_variable_info().
File
- includes/
locale.variable.inc, line 10 - Variable API module. Definition for Drupal core variables
Code
function locale_variable_info($options) {
// This variable will be altered by translation module. See translation.variable.inc
$variables['language_content_type_[node_type]'] = array(
'type' => 'multiple',
'title' => t('Multilingual support'),
'repeat' => array(
'type' => 'enable',
// Set options here so translation module can add some more
'options' => array(
t('Disabled'),
t('Enabled'),
),
),
'description' => t('Enable multilingual support for this content type. If enabled, a language selection field will be added to the editing form, allowing you to select from one of the <a href="!languages">enabled languages</a>. If disabled, new posts are saved with the default language. Existing content will not be affected by changing this option.', array(
'!languages' => url('admin/config/regional/language', $options),
), $options),
'group' => 'node_type_settings',
);
$variables['language_default'] = array(
'title' => t('Site default language'),
'type' => 'select',
'group' => 'regional_settings',
'options callback' => 'locale_variable_options_language',
'format callback' => 'locale_variable_language_default_format',
'element callback' => 'locale_variable_language_default_element',
'default callback' => 'locale_variable_language_default',
);
return $variables;
}