When I have a title for a page, I want it to only capitalize the words that are supposed to be capitalized in my language.
This recipe does just that. You assign the words you don't want upper cased, and this script does the rest. The list of lower cased words comprises common English words. For what its worth, the "rule" for lower casing is all articles (a, an, the), conjunctions (e.g. and, but), and prepositions of less than five letters (e.g. we lower case "from" but not "Until"). The list is not comprehensive.
- This recipe was last tested on PmWiki version: 2.1-Beta14
- This recipe, version v1.0 was installed here December 13, 2005
- v1.1 - Updated for PHP5 (
preg_replace, etc.) Said Achmiz September 17, 2017, at 10:05 PM
- v1.0 - Originally written, based on an earlier discussion with others on the discusion list. I've used this for months now Dec 13, 2005 BenWilson
- BenWilson - Author
User notes +2: If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.