Smart Quotes

There is a nifty function in WordPress that automagically turns so-called "straight" or "dumb" quotes into so-called “smart” or “curly” quotes. (Look at the last sentence closely: There’s a difference between the various quotation marks.)

Different languages use different quotation marks, e.g. Germans use a lower double quotation mark („) to open a quotation. The double curly quotation mark that the English use to open (“) the Germans use to close a quotation.

So built right into WordPress is the option for translators to change the look of the smart quotes in the language files. However there are two caveats which I address in the plugin “Smart Quotes”:

  • Many languages have alternative styles, depending on personal taste, industry tradition, etc., or some languages are spoken in multiple countries, but countries speaking the same language may still use different quotation marks – e.g. Germans use „…“ whereas the German-speaking Swiss use «…», but there is no special localized version of WordPress for Swiss-German (de_CH)
  • The language file does not normally get used to style the HTML <q> element

With “Smart Quotes” you can pick any arbitrary character combination that will be used both for the WordPress magic (wptexturize for those interested) and for styling the <q> element.

Download “Smart Quotes” (.zip)

After you’ve installed the plugin you can pick your quotation marks on the Writing Settings screen.

  1. Wouldn’t it be even smarter to have a plugin that changes quotes in a multilingual installation? I could do with something like that for a project that has to cater for English, French, and German readers.

  2. Tell me how you switch the language and I’ll see if and how the plugin can be adapted!

  3. Looks like a nice plugin, but it doesn’t work with WordPress 3.5.1. Is there any chance we will see an updated version?

  4. Thanks, Emma, for pointing this out. Turns out I wasn’t really paying any attention there. Updated version is available since yesterday.

  5. Thank you Martin!

Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>