Module Monday: Field Label Plurals

How to Set Up Singular (Non-Plural) Field Labels in Drupal 7

It's the little details about a web site that make you smile when you're finished building it: the subtle CSS effects, the way it intelligently pre-populates forms for you, the great organization of a complex content model, and the just-so text copy that makes things feel "right." That's why little details can be annoying, too. Take, for example, the names of multi-value FieldAPI fields on a Drupal content type. You can label a field 'Photos,' for example, but what if an editor only enters one? Somewhere, a copyeditor is grinding their molars over that one, but a convenient little Drupal module can save the day: Field Label Plurals.








Screenshot of administration screen

Setting up the module is, as one might expect, pretty straightforward: turn it on, then visit an existing FieldAPI field configuration screen. You'll see a new option just below the field's normal Label: a Single-Value label. Set up both labels to match the proper pluralization rules, and the module handles the rest.








Screenshot of resulting change to site

When a multi-value field is displayed to a site visitor, the label will change intelligently based on how many values have been added to the content item. There is a hitch, of course: in some languages, there are multiple "plural forms" of a given word rather than just one. If you plan to translate your site into one of those languages (like Arabic and Polish), this module won't be able to account for all of those forms. If you're comfortable sticking with a boring old language like English, though, Field Label Plurals can definitely add an extra bit of verbal polish.

Get in touch with us

Tell us about your project or drop us a line. We'd love to hear from you!