Index: includes/bootstrap.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v
retrieving revision 1.270
diff -u -p -r1.270 bootstrap.inc
--- includes/bootstrap.inc	25 Feb 2009 13:49:26 -0000	1.270
+++ includes/bootstrap.inc	27 Feb 2009 10:07:55 -0000
@@ -238,6 +238,14 @@ define('REGISTRY_WRITE_LOOKUP_CACHE', 2)
  * @} End of "Title text filtering flags".
  */
 
+/**
+ * Variable-name extension to specify translatable variables.
+ * If var.VARIABLE_TRANSLATABLE is set to true, the variable var is translatable.
+ */
+define('VARIABLE_TRANSLATABLE','_translatable');
+
+
+
 
 /**
  * Start the timer with the specified name. If you start and stop
@@ -623,21 +631,55 @@ function variable_init($conf = array()) 
 
 /**
  * Return a persistent variable.
+ * If the variable $name.VARIABLE_TRANSLATABLE is set to true, the 
+ * translated variable $name is returned, otherwise $name is returned 
+ * directly.
  *
  * @param $name
  *   The name of the variable to return.
  * @param $default
  *   The default value to use if this variable has never been set.
  * @return
- *   The value of the variable.
+ *   The translated value of the variable.
+ * @see t()
  */
+
 function variable_get($name, $default = NULL) {
   global $conf;
+  $trans = $name.VARIABLE_TRANSLATABLE;
 
-  return isset($conf[$name]) ? $conf[$name] : $default;
+  if (!(isset($conf[$trans]) && $conf[$trans])) {
+    return  isset($conf[$name]) ? $conf[$name] : $default;
+  } else {
+    $cont = isset($conf[$name]) ? $conf[$name] : $default;
+    if (is_null($cont)) {
+      return $cont;
+    }
+    return t($cont);
+  } 
 }
 
 /**
+ * Sets the translatable-status of the given variable.
+ * If $translatable is set to true, $name.VARIABLE_TRANSLATABLE is set to true, otherwise it is deleted.
+ * @param $name
+ *   The name of the variable to set the translatable status for.
+ * @param $translatable
+ *   Wether the given variable is translatable or not.
+ * @see variable_get()
+ * @see variable_set()
+ */
+function variable_set_translatable($name, $translatable=true) {
+  $trans = $name.VARIABLE_TRANSLATABLE;
+  if ($translatable) {
+    variable_set($trans,true);
+  } else {
+    variable_del($trans);
+  }
+}
+
+
+/**
  * Set a persistent variable.
  *
  * @param $name
