In the process of developing and refining our CMS, the question occasionally arises whether or not we should convert text inputs from format X to format Y. These questions range from the innocuous and straightforward (should we convert curly quotes to straight quotes? or vice versa?) to the more insidious (should we correct a misspelling? should we move close quotes to outside a period?).
On the one hand, it’s probably best to let users make mistakes, or format as they wish, and depend on human communication to clear things up— instead of trying to build in a bunch of extra structure designed to cover for mistakes. It’s our view that the latter approach leads to bloated, overbuilt CMS systems that discourage accountability. But at the same time, consistency and coherence of communication across a Web site is a really, really important thing— it is what distinguishes sites that serve as good vehicles for an institution’s messaging from sites that are just decorated Web pages.
We’re thinking about this right now because we are considering automatically converting the titles of news items in LiveWhale to Title Case. The following three news headlines, though identical in content, send very different messages:
1. White Whale Web Services to Release New Content Management System, Revolutionize CMS Industry
2. White Whale Web Services to release new content management system, revolutionize CMS industry
3. WHITE WHALE WEB SERVICES TO RELEASE NEW CONTENT MANAGEMENT SYSTEM, REVOLUTIONIZE CMS INDUSTRY
Although there might be a justification for #3 in a particular Web design, it’s clear that you wouldn’t want a user to enter news headlines that way. For one thing, caps are just hard to read in many contexts; but on top of that, it’s always easy to {text-transform:uppercase} if you need caps. My general preference as a design snob would be for #2, but that’s clearly not common practice— as much as I enjoy headlines like this (or this), that style is much more common in European news than American.
It’s also the case that styles #1 and #2 look terrible next to each other:
- White Whale Web Services to Release New Content Management System, Revolutionize CMS Industry
- Other CMS providers cower in fear
So. Should we let users do what they will, and enter headlines according to any system they prefer? Or should we legislate something? It seems pretty clear from the above examples that— at least in the particular case of news headlines— legislating is the way to go. And if you’re going to require a particular format for headlines, it seems pretty clear that Title Case Is Your Only Option.
So what’s the best way to do it?
You could, for example, simply ask the user to format the headline a particular way:
___________________________________________________
Please use Title Case for headlines.
Or, a bit more diplomatically, you could provide an example:
___________________________________________________
Example: Stock Market Soars on Rumors of Bailout
Alternatively, we could let users enter any headlines they want, and control the front end display with CSS’s text-transform property. But that’s not going to work either, because these are the only options we have:
| Value | Description |
|---|---|
| none | Default. Defines normal text, with lower case letters and capital letters |
| capitalize | Each word in a text starts with a capital letter |
| uppercase | Defines only capital letters |
| lowercase | Defines no capital letters, only lower case letters |
Title Case Is Great, But Not If You Capitalize Every Word In The Sentence. Otherwise It Looks Hacky. The text-transform property doesn’t have the kind of sensitivity you’d want in a good Title Case headline. I am personally big on punctuation and capitalization styles that reflect spoken rhythms— that’s why, no matter what Douglas says, I always put a space after an em dash— and capitalizing “the,” “and,” etc. ruins the spoken rhythm of a headline.
So the only approach left— assuming you want to engage this issue at all!— is to automatically convert headlines into Title Case on the back end. And that’s the whole reason I started this post in the first place.
It turns out that converting to Title Case is nowhere near as simple as you’d imagine. Sure, we know that you don’t capitalize “the” or “a” or prepositions, etc. But how about sentences like these?
Read markdown_rules.txt to Find Out How _Underscores Around Words_ Will Be Interpreted
Notes and Observations Regarding Apple’s Announcements From ‘The Beat Goes On’ Special Event
These sentences are from a suite of test cases for a Title Case script originally created by John Gruber of Daring Fireball. We are planning to use the PHP version of the script to convert some of Southwestern’s old news headlines (originally entered with uppercase headlines) to a thoughtful Title Case, and are considering using it when headlines are created in LiveWhale in the first place. In the process we discovered yet another odd, fascinating corner of the world of CMS development to geek out in.
Tags: code, livewhale, lwblog, php, Title Case
Post a Comment