| 1 |
<?php |
<?php |
| 2 |
// $Id: i18nprofile.module,v 1.6.2.11 2009/08/04 16:01:18 neochief Exp $ |
// $Id: i18nprofile.module,v 1.6.2.12 2009/08/29 21:08:24 hass Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 33 |
switch ($op) { |
switch ($op) { |
| 34 |
case 'groups': |
case 'groups': |
| 35 |
return array('profile' => t('Profile')); |
return array('profile' => t('Profile')); |
| 36 |
|
case 'info': |
| 37 |
case 'refresh': |
$info['profile']['refresh callback'] = 'i18nprofile_locale_refresh'; |
| 38 |
if ($group == 'profile') { |
return $info; |
|
return i18nprofile_locale_refresh(); |
|
|
} |
|
| 39 |
} |
} |
| 40 |
} |
} |
| 41 |
|
|
| 54 |
$categories[$field->category] = 1; |
$categories[$field->category] = 1; |
| 55 |
} |
} |
| 56 |
} |
} |
| 57 |
|
return TRUE; // Meaning it completed with no issues |
| 58 |
} |
} |
| 59 |
|
|
| 60 |
/** |
/** |
| 190 |
if (!empty($form[$field]['#title'])) { |
if (!empty($form[$field]['#title'])) { |
| 191 |
$form[$field]['#title'] = tt("profile:field:$field:title", $form[$field]['#title']); |
$form[$field]['#title'] = tt("profile:field:$field:title", $form[$field]['#title']); |
| 192 |
} |
} |
| 193 |
|
elseif (!empty($form[$field]['#value'])) { |
| 194 |
|
// Special treating for checboxes. |
| 195 |
|
$field_type = db_result(db_query("SELECT type FROM {profile_fields} WHERE name = '%s'", $field)); |
| 196 |
|
if ($field_type == 'checkbox') { |
| 197 |
|
$form[$field]['#value'] = tt("profile:field:$field:title", $form[$field]['#value']); |
| 198 |
|
} |
| 199 |
|
} |
| 200 |
|
|
| 201 |
if (!empty($form[$field]['#description'])) { |
if (!empty($form[$field]['#description'])) { |
| 202 |
$form[$field]['#description'] = tt("profile:field:$field:description", $form[$field]['#description']); |
$form[$field]['#description'] = tt("profile:field:$field:description", $form[$field]['#description']); |
| 203 |
} |
} |