aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/functions.inc.php')
-rw-r--r--include/functions.inc.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/functions.inc.php b/include/functions.inc.php
index 537edc32a..bfa7ad28f 100644
--- a/include/functions.inc.php
+++ b/include/functions.inc.php
@@ -935,6 +935,21 @@ function l10n($key)
}
/**
+ * returns the prinft value for strings including %d
+ * return is concorded with decimal value (singular, plural)
+ *
+ * @param singular string key
+ * @param plural string key
+ * @param decimal value
+ * @return string
+ */
+function l10n_dec($singular_fmt_key, $plural_fmt_key, $decimal)
+{
+ return sprintf(l10n(($decimal > 1 ? $plural_fmt_key :
+ $singular_fmt_key)), $decimal);
+}
+
+/**
* Translate string in string ascii7bits
* It's possible to do that with iconv_substr
* but this fonction is not avaible on all the providers.