Author

We’ve recently been working on a multi-language WordPress site that includes Nepali content. We noticed the site was trying to output a very odd translation for a particular word.

Screenshot showing Nepali text surrounding Latin characters 'bout

WordPress and multi-language plugin WPML conspired to use WordPress’ default list of supposedly ‘Cockney’ terms to replace the Nepali text.

Autocorrection

WordPress has a list of characters it ‘autocorrects’ when it outputs, mostly to do with angled quote marks and apostrophes. Alongside this, it tries to make sure that if used in certain words, the apostrophe is replaced correctly. In particular, it turns out, it has a list of what it calls ‘Cockney’ words to replace the apostrophe at the start of words, such as ’twere, ’cause and ’twill.

The wptexturize() function

We’re using the term Cockney here because WordPress’s documentation uses the variable $wp_cockneyreplace in the context of the wptexturize() function. However, it’s not really a Cockney thing, rather a method of replacing incorrect typography on archaic contractions such as ‘tain’t, ‘twas, and ‘bout.

But we did think it was quite interesting!

See also

Grown up WordPress, part 1

WordPress is more than capable of handling large, complex, and highly integrated websites.

Open Source isn’t really what clients want

Headscape used to offer its own content management system (CMS) to would be clients. It was first developed back in the early noughties when CMSs were ridiculously expensive and awful to use.

How to choose the right technology for your project

Sometimes we have technologies foisted upon us. Sometimes that’s bad. Sometimes it’s good. This post examines approaches we can all learn from when selecting technologies.