From 0932803a2c0a61924209dfe277dec32bced63c0c Mon Sep 17 00:00:00 2001 From: webchick Date: Mon, 26 Mar 2012 22:25:40 -0700 Subject: =?UTF-8?q?Issue=20#1221276=20by=20gumanist,=20fietserwin,=20G?= =?UTF-8?q?=C3=A1bor=20Hojtsy,=20sun,=20kalman.hosszu:=20Fixed=20locale=5F?= =?UTF-8?q?get=5Fplural()=20only=20works=20for=20a=20single=20language=20w?= =?UTF-8?q?ithin=20a=20request=20and=20does=20not=20work=20for=20English.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- includes/common.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'includes') diff --git a/includes/common.inc b/includes/common.inc index f153066e5..cb77e330d 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -1734,7 +1734,8 @@ function format_plural($count, $singular, $plural, array $args = array(), array // Get the plural index through the gettext formula. $index = (function_exists('locale_get_plural')) ? locale_get_plural($count, isset($options['langcode']) ? $options['langcode'] : NULL) : -1; - // Backwards compatibility. + // If the index cannot be computed, use the plural as a fallback (which + // allows for most flexiblity with the replaceable @count value). if ($index < 0) { return t($plural, $args, $options); } -- cgit v1.2.3