Index: includes/bootstrap.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v
retrieving revision 1.277
diff -u -p -r1.277 bootstrap.inc
--- includes/bootstrap.inc	24 Apr 2009 08:15:50 -0000	1.277
+++ includes/bootstrap.inc	24 Apr 2009 09:26:21 -0000
@@ -236,6 +236,13 @@ 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
@@ -621,18 +628,32 @@ 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_string($cont)) {
+      return $cont;
+    }
+    return t($cont);
+  }  
 }
 
 /**
@@ -671,6 +692,28 @@ function variable_del($name) {
   unset($conf[$name]);
 }
 
+/**
+ * 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);
+  }
+}
+
 
 /**
  * Retrieve the current page from the cache.
