/**
* Returns the translation of a message.
*
- * @var string $message The string to translate.
+ * @param string $message The string to translate.
*
* @return string The string translation, or the original string if no
* translation exists.
{
return $this->_gettext ? dgettext($this->_domain, $message) : $message;
}
+
+ /**
+ * Returns the plural translation of a message.
+ *
+ * @param string $singular The singular version to translate.
+ * @param string $plural The plural version to translate.
+ * @param integer $number The number that determines singular vs. plural.
+ *
+ * @return string The string translation, or the original string if no
+ * translation exists.
+ */
+ public function n($singular, $plural, $number)
+ {
+ return $this->_gettext
+ ? dngettext($this->_domain, $singular, $plural, $number)
+ : ($number == 1 ? $singular : $plural);
+ }
}