diff options
-rw-r--r-- | CHANGELOG.txt | 2 | ||||
-rw-r--r-- | modules/locale/locale.module | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 27ff80b89..4d2ca4595 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -14,6 +14,8 @@ Drupal 7.15, xxxx-xx-xx (development version) - Introduced generic entity language support. Entities may now declare their language property in hook_entity_info(), and modules working with entities may access the language using entity_language() (API change). +- Fixed regression: The first plural index on a page was not calculated + correctly. Drupal 7.14 2012-05-02 ---------------------- 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 |