Field label reacting items count

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
Grzegorz Zbiński's picture

I think that it would be great to make field label settings sensitive to items count. I don't know it is possible (I'm not dev) but it would be just great.

Example:

If I have multi value field (taxonomy, entity reference, etc.) it would be great if I can set up different behavior of label reacting for count of items it labeling. Right now we have simple option "Create label" with "Place colon after the label". My suggestion: (o) is radio switch.

(*) Simple label (default)
(o) Label reacting of field items

Label for 1 item: _____________
Label for many items: _____________

So if I have user entity relationship to show author or authors I could do:

(o) Simple label (default)
(*) Label reacting of field items

Label for 1 item: Author
Label for many items: Authors

What do You think?

Comments

I like it

rmontero's picture

It would have to be strings that match format_plural() http://api.drupal.org/api/drupal/includes%21common.inc/function/format_p...

like '1 author' and '@count authors', and then the translation part would be done at the string level.

Yeah we can make that happen. Do you have enough use cases to justify this though?

Best regards,

Rob Montero
Zend Certified Senior Drupal Engineer
Achieve Internet

I could also think of adding

Niklas Fiekas's picture

I could also think of adding Views support to http://drupal.org/project/field_label_plurals.

Views Developers

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: