summaryrefslogtreecommitdiff
path: root/program/include/rcmail.php
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2011-08-13 11:44:29 +0000
committerthomascube <thomas@roundcube.net>2011-08-13 11:44:29 +0000
commit1c72e9983dfc9bbfb0fe4c0f02215855b0cb3e5f (patch)
treef9d95a215d3aaa8c6efc2feac0d261ce94a52a75 /program/include/rcmail.php
parent6667bcf9649c1895ac31093ccd63671113b3fc1c (diff)
parenta02cfa9b085fc875fc55f57029a8e5846771ed5e (diff)
Tagging files for release 0.5.4v0.5.4
Diffstat (limited to 'program/include/rcmail.php')
-rw-r--r--program/include/rcmail.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index 7ef34724e..d29ebe780 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -915,6 +915,21 @@ class rcmail
return $text;
}
+ /**
+ * Check if the given text lable exists
+ *
+ * @param string Label name
+ * @return boolean True if text exists (either in the current language or in en_US)
+ */
+ public function text_exists($name, $domain=null)
+ {
+ // load localization files if not done yet
+ if (empty($this->texts))
+ $this->load_language();
+
+ // check for text with domain first
+ return ($domain && isset($this->texts[$domain.'.'.$name])) || isset($this->texts[$name]);
+ }
/**
* Load a localization package