Index: includes/bootstrap.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v
retrieving revision 1.271
diff -u -p -r1.271 bootstrap.inc
--- includes/bootstrap.inc	1 Mar 2009 09:32:17 -0000	1.271
+++ includes/bootstrap.inc	5 Mar 2009 16:03:58 -0000
@@ -235,6 +235,13 @@ define('REGISTRY_RESET_LOOKUP_CACHE', 1)
 define('REGISTRY_WRITE_LOOKUP_CACHE', 2);
 
 /**
+ * Variable-name extension to specify translatable variables.
+ * If var.VARIABLE_TRANSLATABLE is set to true, the variable var is 
+ * translatable.
+ */
+define('VARIABLE_TRANSLATABLE','_translatable');
+
+/**
  * @} End of "Title text filtering flags".
  */
 
@@ -623,18 +630,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;
+
+  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);
+  }  
+}
 
-  return isset($conf[$name]) ? $conf[$name] : $default;
+/**
+  * 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);
+  }
 }
 
 /**
