From c6e6d09dba4bb4807e5c6b4f8d23954019c6b38d Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Tue, 8 Mar 2011 00:35:15 +0000 Subject: improved languages.php --- h-source/Application/Include/myFunctions.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'h-source/Application/Include/myFunctions.php') diff --git a/h-source/Application/Include/myFunctions.php b/h-source/Application/Include/myFunctions.php index cdb5358..4d01851 100644 --- a/h-source/Application/Include/myFunctions.php +++ b/h-source/Application/Include/myFunctions.php @@ -386,6 +386,24 @@ function gtext($string) return $string; } +function singular($string) +{ + if (isset(Lang::$singular[Lang::$current][$string])) + { + return Lang::$singular[Lang::$current][$string]; + } + return $string; +} + +function plural($string) +{ + if (isset(Lang::$plural[Lang::$current][$string])) + { + return Lang::$plural[Lang::$current][$string]; + } + return $string; +} + //rewrite the vendor name function betterVendor($string) { -- cgit v1.2.3