| 5 locale.module | locale_get_plural($count) |
| 6 locale.module | locale_get_plural($count, $langcode = NULL) |
| 7 locale.module | locale_get_plural($count, $langcode = NULL) |
| 8 locale.module | locale_get_plural($count, $langcode = NULL) |
Returns plural form index for a specific number.
The index is computed from the formula of this language.
1 call to locale_get_plural()
1 string reference to 'locale_get_plural'
File
- modules/
locale/ locale.module, line 274 - Enables administrators to manage the site interface languages.
Code
function locale_get_plural($count) {
global $locale;
static $locale_formula, $plurals = array();
if (!isset($plurals[$count])) {
if (!isset($locale_formula)) {
$languages = locale_supported_languages();
$locale_formula = $languages['formula'][$locale];
}
if ($locale_formula) {
$n = $count;
$plurals[$count] = @eval("return intval($locale_formula);");
return $plurals[$count];
}
else {
$plurals[$count] = -1;
return -1;
}
}
return $plurals[$count];
}
Login or register to post comments