function i18n_form_alter_settings in Internationalization 5
Same name and namespace in other branches
- 5.3 i18n.module \i18n_form_alter_settings()
- 5.2 i18n.module \i18n_form_alter_settings()
- 6 i18n.module \i18n_form_alter_settings()
Check for multilingual variables in form
1 call to i18n_form_alter_settings()
- i18n_form_alter in ./
i18n.module - Implementation of hook_form_alter
File
- ./
i18n.module, line 957 - Internationalization (i18n) module
Code
function i18n_form_alter_settings(&$form, &$variables) {
$result = 0;
foreach (element_children($form) as $field) {
if ($form[$field]['#type'] == 'fieldset') {
$result += i18n_form_alter_settings($form[$field], $variables);
}
elseif (in_array($field, $variables)) {
$form[$field]['#description'] .= ' <strong>' . t('This is a multilingual variable.') . '</strong>';
$result++;
}
}
return $result;
}