diff --git a/modules/locale/locale.install b/modules/locale/locale.install
index 9c54105..83c14f3 100644
--- a/modules/locale/locale.install
+++ b/modules/locale/locale.install
@@ -242,6 +242,7 @@ function locale_uninstall() {
   variable_del('language_content_type_default');
   variable_del('language_content_type_negotiation');
   variable_del('locale_cache_strings');
+  variable_del('locale_cache_length');
   variable_del('locale_js_directory');
   variable_del('javascript_parsed');
   variable_del('language_negotiation');
diff --git a/modules/locale/locale.module b/modules/locale/locale.module
index 092eb48..81acc37 100644
--- a/modules/locale/locale.module
+++ b/modules/locale/locale.module
@@ -357,7 +357,7 @@ function locale($string = NULL, $langcode = NULL, $reset = FALSE) {
         // Refresh database stored cache of translations for given language.
         // We only store short strings used in current version, to improve
         // performance and consume less memory.
-        $result = db_query("SELECT s.source, t.translation, t.language FROM {locales_source} s LEFT JOIN {locales_target} t ON s.lid = t.lid AND t.language = '%s' WHERE s.textgroup = 'default' AND s.version = '%s' AND LENGTH(s.source) < 75", $langcode, VERSION);
+        $result = db_query("SELECT s.source, t.translation, t.language FROM {locales_source} s LEFT JOIN {locales_target} t ON s.lid = t.lid AND t.language = '%s' WHERE s.textgroup = 'default' AND s.version = '%s' AND LENGTH(s.source) < %d", $langcode, VERSION, variable_get('locale_cache_length', 75));
         while ($data = db_fetch_object($result)) {
           $locale_t[$langcode][$data->source] = (empty($data->translation) ? TRUE : $data->translation);
         }
