aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorvdigital <vdigital@piwigo.org>2007-02-27 06:22:17 +0000
committervdigital <vdigital@piwigo.org>2007-02-27 06:22:17 +0000
commit7053787d1f4d4500080185af6878835217aa17a5 (patch)
treef98c8f831e4a180ae92fd9d676394220e02abfec /include
parent47512ce6a64fa356214c162a8313480c6aed41d2 (diff)
Bug: English plural rule is slightly different from French (0 is plural, not in French)
git-svn-id: http://piwigo.org/svn/trunk@1862 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include')
-rw-r--r--include/functions.inc.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/functions.inc.php b/include/functions.inc.php
index 50f247a47..46651c284 100644
--- a/include/functions.inc.php
+++ b/include/functions.inc.php
@@ -1011,6 +1011,11 @@ function l10n($key)
*/
function l10n_dec($singular_fmt_key, $plural_fmt_key, $decimal)
{
+ global $lang_info;
+ if ( $lang_info['zero_plural'] and $decimal == 0 )
+ {
+ return sprintf(l10n($plural_fmt_key), 0);
+ }
return sprintf(l10n(($decimal > 1 ? $plural_fmt_key :
$singular_fmt_key)), $decimal);
}