Feature #14894

stdWrap.age should differenciate between singular/plural

Added by Ernesto Baschny almost 16 years ago. Updated about 10 years ago.

Should have
Content Rendering
Target version:
Start date:
Due date:
% Done:


Estimated time:
PHP Version:
Sprint Focus:


The .age stdWrap parameter currently only allows us to specify " min| hrs| days| yrs", which will also show plural text if we have a quantity of "1". The attached patch (for typo3/sysext/cms/tslib/class.tslib_content.php) changes the possible value of the .age setting to allow 8 values:

" min| hrs| days| yrs| min| hour| day| year"

The second set is the singular variant. So we can have outputs like "1 hour" and "1 year". It remains backwards compatible, in that older TYPO3 (with newer TypoScript) will still show the "good-old" plural variants.

In a remote future this text should become language-dependent, so that we have different outputs depending on the language of the site. This should also be prepared for situations where not always is the "1" unit singular and all others plural. There are languages where there are other rules for plurals (see gettext, PO-setting "Plural-Forms").
(issue imported from #M1333)


class.tslib_content.php-calcAge.patch (1.22 KB) class.tslib_content.php-calcAge.patch Administrator Admin, 2005-08-02 13:39
1333_v2.diff (1.54 KB) 1333_v2.diff Administrator Admin, 2010-10-19 15:24

Updated by Susanne Moog over 10 years ago

Committed to trunk rev 9278.


Updated by Ernesto Baschny over 10 years ago

Amazing.. 5 years later => solved! thanks Susanne ;)


Updated by Susanne Moog about 10 years ago

  • Target version deleted (4.5.0)

Also available in: Atom PDF