Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.863
diff -u -p -r1.863 common.inc
--- includes/common.inc	3 Feb 2009 18:55:29 -0000	1.863
+++ includes/common.inc	4 Feb 2009 01:23:15 -0000
@@ -3281,6 +3281,11 @@ function drupal_render_page($page) {
  * drupal_render(), for example from a database query, set
  * $elements['#sorted'] = TRUE to avoid sorting them a second time.
  *
+ * This function also supports rendering on the translation of an element
+ * in the current language. To take advantage of this, set
+ * $elements['#translatable'] = TRUE and ensure that children are keyed by
+ * language.
+ *
  * @param $elements
  *   The structured array describing the data to be rendered.
  * @return
@@ -3380,12 +3385,21 @@ function drupal_render(&$elements) {
  *   in to save another run of element_children().
  */
 function drupal_render_children($element, $children_keys = NULL) {
+  global $language;
+
   if ($children_keys === NULL) {
     $children_keys = element_children($element);
   }
   $output = '';
-  foreach ($children_keys as $key) {
-    $output .= drupal_render($element[$key]);
+  if (!empty($element['#translatable'])) {
+    foreach ($children_keys as $key) {
+      $output .= drupal_render($element[$language][$key]);
+    }
+  }
+  else {
+    foreach ($children_keys as $key) {
+      $output .= drupal_render($element[$key]);
+    }
   }
   return $output;
 }
