diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index 35c9e0c..808bdfc 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -237,6 +237,16 @@ const REGISTRY_WRITE_LOOKUP_CACHE = 2;
 const DRUPAL_PHP_FUNCTION_PATTERN = '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*';
 
 /**
+ * Flag for custom string override that does not need to change during page load
+ */
+const STRING_STATIC = 0;
+
+/**
+ * Flag for custom string override that relies on a custom callback function
+ */
+const STRING_CALLBACK = 1;
+
+/**
  * Provides a caching wrapper to be used in place of large array structures.
  *
  * This class should be extended by systems that need to cache large amounts
@@ -1539,7 +1549,17 @@ function t($string, array $args = array(), array $options = array()) {
   }
   // Custom strings work for English too, even if locale module is disabled.
   if (isset($custom_strings[$options['langcode']][$options['context']][$string])) {
-    $string = $custom_strings[$options['langcode']][$options['context']][$string];
+    if (is_array($custom_strings[$options['langcode']][$options['context']][$string])){
+      if ($custom_strings[$options['langcode']][$options['context']][$string]['type'] == STRING_CALLBACK){
+        $string = call_user_func($custom_strings[$options['langcode']][$options['context']][$string]['callback'], $string, $args, $options);
+      }
+      else {
+        $string = $custom_strings[$options['langcode']][$options['context']][$string]['string'];
+      }
+    }
+    else {
+      $string = $custom_strings[$options['langcode']][$options['context']][$string];
+    }  
   }
   // Translate with locale module if enabled.
   elseif ($options['langcode'] != LANGUAGE_SYSTEM && ($options['langcode'] != 'en' || variable_get('locale_translate_english', FALSE)) && function_exists('locale')) {
diff --git a/sites/default/default.settings.php b/sites/default/default.settings.php
index 360e556..1137fb9 100755
--- a/sites/default/default.settings.php
+++ b/sites/default/default.settings.php
@@ -428,12 +428,22 @@ ini_set('session.cookie_lifetime', 2000000);
  * To override specific strings on your site with or without enabling locale
  * module, add an entry to this list. This functionality allows you to change
  * a small number of your site's default English language interface strings.
+ * For replacements that do not need to be conditionally overridden, use an
+ * array as seen below with 'type' STRING_STATIC. Specify the replacement string
+ * as 'string'. For replacement strings that need to be replaced conditionally
+ * use 'type' STRING_CALLBACK with a 'callback' to a custom function in a 
+ * module. Below is an example of such a function.
+ *
+ * function example_replacement_function($string, $args, $options) {
+ *   return variable_get('mymodule_is_compact', TRUE) ? '@count min' : '@count minutes';
+ * }
+ *
  *
  * Remove the leading hash signs to enable.
  */
 # $conf['locale_custom_strings_en'][''] = array(
-#   'forum'      => 'Discussion board',
-#   '@count min' => '@count minutes',
+#   'forum'      => array('type' => STRING_STATIC, 'string' => 'Discussion board'),
+#   '@count min' => array('type' => STRING_CALLBACK, 'callback' => 'example_replacement_function'),
 # );
 
 /**
