Can disable Javascript
[banana.git] / banana / text.func.inc.php
index 48e9b1f..822fd1f 100644 (file)
@@ -7,9 +7,16 @@
 * Copyright: See COPYING files that comes with this distribution\r
 ********************************************************************************/\r
 \r
-function _b_($str)\r
-{\r
-    return dgettext('banana', $str);\r
+if (function_exists('dgettext')) {\r
+    function _b_($str)\r
+    {\r
+        return dgettext('banana', $str);\r
+    }\r
+} else {\r
+    function _b_($str)\r
+    {\r
+        return $str;\r
+    }\r
 }\r
 \r
 if (!function_exists('is_utf8')) {\r
@@ -19,6 +26,15 @@ if (!function_exists('is_utf8')) {
     }\r
 }\r
 \r
+function banana_entities($source)\r
+{\r
+    if (is_string($source)) {\r
+        return banana_htmlentities($source);\r
+    } else {\r
+        return $source;\r
+    }\r
+}\r
+\r
 function banana_utf8entities($source)\r
 {\r
    // array used to figure what number to decrement from character order value \r