Writing by Peter Hilton

Pluralise text correctly

User-interface content design details matter too 2021-10-12 #DDD #UX

unsplash-logoShreena Bindra

Software user interfaces freqently include text that refers to data sets, like You have 7 new messages. If you don’t try very hard, you end up with text like You have 5 new message(s) and if you don’t try at all, You have 1 new messages. Pluralising text correctly matters for readability, even if you treat it as a small detail.

Straightforward to implement

Fortunately, pluralising text doesn’t pose a challenge to software developers. In English, at least, it only requires conditionally outputting the singular form of a noun when a set contains one item, and the plural form otherwise. This makes this an easier software engineering problem to solve than something genuinely hard, such as anything to do with people’s names, or anything to do with time zones.

Not every technology that could make something straightforward actually does, though. If a developer ever skips pluralising text ‘because it doesn’t matter here’, then the technology they used to build the user interface didn’t make it convenient enough. Pluralisation tests any user-interface technology. Fortunately, the good kind of laziness encourages developers to curate good technology, and doing the right thing costs less effort than it used to.

More complex content

Pluralisation makes content management more complex, by adding conditional logic (i.e. code) to prose. Solutions to this problem have existed for a long time, but discovering, understanding and using them costs some effort. That effort pays off, though, by making content management accessible to more people.

In some contexts, the easiest option involves using programmer-friendly content management. After all, developers don’t mind seeing code in the prose. However, if you do this, you may have ‘reduced’ the problem to a harder one: getting programmers to write prose. More scalable solutions manage content, including handling pluralisation, in a way that technical writers can use. Proper content management also handles a more international kind of complexity.

Other languages have more complex pluralisation

In general, adding another language means supporting more complex pluralisation rules than using a different noun form for a single item. Unless you start in a language like Polish, say, or Arabic, which have several categories of plural.

If you didn’t already introduce no-code content management that lets technical writers take care of pluralisation, you certainly need it for translators to manage content in multiple languages, and their varying pluralisation rules.

Note that technology can help with multi-language pluralisation. Some development stacks can pluralise text in multiple languages, using a dictionary of plural forms for each language, and logic to select the correct form. For example, .Net’s PluralizationService class supports language-specific dictionaries, which seems promising. Unfortunately, it leaves providing a dictionary for languages other than English as an ‘exercise for the reader’:

The PluralizationService class applies English rules for constructing plural and singular forms of words. To extend the service to other languages, use the PluralizationService on the EntityModelSchemaGenerator class.

It turns out that the missing puzzle piece remains the data. The next step in easier pluralisation might involve open source linguistics: freely-available dictionaries of plural forms in different languages.

Share on BlueskyShare on XShare on LinkedIn