From 1c72e9983dfc9bbfb0fe4c0f02215855b0cb3e5f Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Sat, 13 Aug 2011 07:44:29 -0400
Subject: [PATCH] Tagging files for release 0.5.4

---
 program/include/rcmail.php |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index 7ef3472..d29ebe7 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -915,6 +915,21 @@
     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

--
Gitblit v1.9.1