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.
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?
Thank you Martin!
Already wrote in the WP plugin directory forums, but I’ll try again here:
It seems that in line 63 & 64 of your smart-quotes.php you are not distiguishing between single and double quotes, but replacing both with one glyph.
Why is that?
There appears to be a small bug when the closing quote comes after a number. Here is what is causing my problem:
"5" produces «5″(Spanish opening quote, wp default closing quote)
"5" produces «5«(Spanish opening quote, Spanish opening quote again)
It’s the same in the 2013 theme also.
Thanks for your help!
That second “5” is inside an anchor tag, which probably isn’t obvious.
Comments feed for this article
Trackback link: https://ten-fingers-and-a-brain.com/wordpress-plugins/smart-quotes/trackback/