summaryrefslogtreecommitdiff
path: root/modules/locale
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2012-06-09 16:04:05 -0400
committerDavid Rothstein <drothstein@gmail.com>2012-06-09 16:04:05 -0400
commit988597f0df339cfc22240852d3d130b3718a63a7 (patch)
treea6529b572f93c4033c74b6a2f1724b540ec3a2b3 /modules/locale
parenta12152309a64b5c3b9ea6a41e8da2baa9971f612 (diff)
downloadbrdo-988597f0df339cfc22240852d3d130b3718a63a7.tar.gz
brdo-988597f0df339cfc22240852d3d130b3718a63a7.tar.bz2
Issue #1567662 by sun | Georgii: Fixed The 1st plural index on a page is not calculated correctly.
Diffstat (limited to 'modules/locale')
-rw-r--r--modules/locale/locale.module5
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/locale/locale.module b/modules/locale/locale.module
index c3133bc0f..029492091 100644
--- a/modules/locale/locale.module
+++ b/modules/locale/locale.module
@@ -758,9 +758,8 @@ function locale_get_plural($count, $langcode = NULL) {
if (!isset($plural_indexes[$langcode][$count])) {
// Retrieve and statically cache the plural formulas for all languages.
if (empty($plural_formulas)) {
- $language_list = language_list();
- foreach ($language_list as $langcode => $lang) {
- $plural_formulas[$langcode] = $lang->formula;
+ foreach (language_list() as $installed_language) {
+ $plural_formulas[$installed_language->language] = $installed_language->formula;
}
}
// If there is a plural formula for the language, evaluate it for the given