It'd be nice to have a feature to capitalize the address components. I've attached a patch which gets the job done, although there may be a better way to go about it...

CommentFileSizeAuthor
addressfield-capitalize-796936.patch2.1 KBbalatin
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

balatin’s picture

bojanz’s picture

Status: Active » Closed (won't fix)

There are several problems to consider here:

1) Capitalization is only done on postal labels (for envelopes, packages, etc). It's not done for web display.
This is because capitalization is only done to faciliate automated label scanning.
2) Each country specifies which fields need to be capitalized, that info is a part of the address format.
3) Subdivisions (administrative areas, localities, dependent localities) need to have both a "name" and a "code", the first shown on the address form, the second shown on display (and the postal label). Right now in 1.x we only have the "name". So even if we solved #1 and #2, we still wouldn't always have the correct data to capitalize.

We've addressed all of this in our commerceguys/addressing library, and in the (still in progress) Address module which will replace addressfield in D8. But in addressfield 1.x for D7 we've done all that we could.