function transliteration_form_system_file_system_settings_alter in Transliteration 6.3
Same name and namespace in other branches
- 7.3 transliteration.module \transliteration_form_system_file_system_settings_alter()
Implements hook_form_FORM_ID_alter().
Add transliteration settings to the file system configuration form.
File
- ./
transliteration.module, line 38 - Converts non-latin text to US-ASCII and sanitizes file names.
Code
function transliteration_form_system_file_system_settings_alter(&$form, &$form_state) {
$form['transliteration'] = array(
'#type' => 'item',
'#title' => t('Transliteration'),
'#value' => '',
);
$form['transliteration']['transliteration_file_uploads'] = array(
'#type' => 'checkbox',
'#title' => t('Transliterate file names during upload.'),
'#description' => t('Enable to convert file names to US-ASCII character set for cross-platform compatibility.'),
'#default_value' => variable_get('transliteration_file_uploads', TRUE),
);
$form['transliteration']['transliteration_file_lowercase'] = array(
'#type' => 'checkbox',
'#title' => t('Lowercase transliterated file names.'),
'#default_value' => variable_get('transliteration_file_lowercase', TRUE),
'#description' => t('This is a recommended setting to prevent issues with case-insensitive file systems. It has no effect if transliteration has been disabled.'),
);
$form['buttons']['#weight'] = 1;
}