You are here

function pretty_calendar_plural in Pretty Calendar 7

Extended plural values.

To translate names we should set some values or leave "story,stories'. Then we can use "1 story", "@count stories", "@count[2] stories" on "/admin/config/regional/translate/translate" page.

Parameters

int $count: Number.

Return value

string Formatted plural value. For example, "17 events".

2 calls to pretty_calendar_plural()
pretty-calendar-day.tpl.php in ./pretty-calendar-day.tpl.php
Theme implementation to display day cell.
pretty_calendar_links_loader in ./pretty_calendar.module
AJAX response for preloading node links.

File

./pretty_calendar.module, line 489
Simple nice calendar module that displays the materials by date.

Code

function pretty_calendar_plural($count) {
  $words = explode(',', variable_get('pretty_calendar_title_words', t('story,stories')));
  if (!isset($words[0]) || !isset($words[1])) {
    $words = explode(',', 'story,stories');
  }
  return format_plural($count, '1 ' . $words[0], '@count ' . $words[1]);
}