Index: mod/data/lib.php
===================================================================
--- mod/data/lib.php	(revision )
+++ mod/data/lib.php	(revision )
@@ -495,7 +495,12 @@
     if ($template == 'csstemplate' or $template == 'jstemplate' ) {
         return '';
     }
-
+    // RTL table cell layout support
+    if (right_to_left()) {
+      $alignment = 'right';
+    } else {
+      $alignment = 'left';
+    }
     // get all the fields for that database
     if ($fields = $DB->get_records('data_fields', array('dataid'=>$data->id), 'id')) {
 
@@ -518,7 +523,7 @@
             //}
             $str .= '</td>';
 
-            $str .='<td  align="left">';
+            $str .='<td  align="'.$alignment.'">';
             if ($form) {   // Print forms instead of data
                 $fieldobj = data_get_field($field, $data);
                 $str .= $fieldobj->display_add_field($recordid);
