Field label reacting items count

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by Grzegorz Zbiński on February 8, 2012 at 8:19pm

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?

Categories:

Comments

I like it

Posted by rmontero on February 8, 2012 at 9:00pm

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

Posted by Niklas Fiekas on February 8, 2012 at 11:34pm

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:

AltStyle によって変換されたページ (->オリジナル) /