Index: profile.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/Attic/profile.module,v
retrieving revision 1.154.2.1
diff -u -Ffunction -r1.154.2.1 profile.module
--- profile.module	2 Jul 2006 20:53:52 -0000	1.154.2.1
+++ profile.module	26 Aug 2006 08:35:27 -0000
@@ -237,7 +237,7 @@ function profile_field_form($arg = NULL)
     $form['fields']['options'] = array('#type' => 'textarea',
       '#title' => t('Selection options'),
       '#default_value' => $edit['options'],
-      '#description' => t('A list of all options. Put each option on a separate line. Example options are "red", "blue", "green", etc.'),
+      '#description' => t('A list of all options. Put each option on a separate line. Example options are "red", "blue", "green", etc.<br />You can optionally specify a key for each option by separating key and text with two pipes, like "BR||Brazil" or "UK||United Kingdom".'),
     );
   }
   $form['fields']['weight'] = array('#type' => 'weight',
@@ -664,7 +664,12 @@ function profile_form_profile($edit, $us
         $lines = split("[,\n\r]", $field->options);
         foreach ($lines as $line) {
           if ($line = trim($line)) {
-            $options[$line] = $line;
+            $parts = explode('||',$line);
+            if ( $parts[1] ) {
+              $options[trim($parts[0])] = trim($parts[1]);
+            } else {
+	          $options[$line] = $line;
+	        }
           }
         }
         $fields[$category][$field->name] = array('#type' => 'select',
