function i18nprofile_form_translate_all in Internationalization 6
Same name and namespace in other branches
- 5.3 i18nprofile/i18nprofile.module \i18nprofile_form_translate_all()
- 5 i18nprofile/i18nprofile.module \i18nprofile_form_translate_all()
- 5.2 i18nprofile/i18nprofile.module \i18nprofile_form_translate_all()
Translate form fields for all categories.
This is useful when we don't know which categories we have, like in the user register form.
1 call to i18nprofile_form_translate_all()
- i18nprofile_form_alter in i18nprofile/
i18nprofile.module - Implementation of hook_form_alter().
File
- i18nprofile/
i18nprofile.module, line 246 - Internationalization (i18n) submodule: Profile translation.
Code
function i18nprofile_form_translate_all($form_id, &$form) {
$categories = profile_categories();
if (is_array($categories)) {
foreach ($categories as $category) {
if (isset($form[$category['name']])) {
i18nprofile_form_translate_category($form, $category['name']);
}
}
}
}