Correct Quotation Marks Per Language
Makes <q> quotations use the right quote marks for the language of the page or passage, such as « » in French, „ “ in German and 「 」 in Japanese.
Opens WPIDE on
Code
:lang(en) q { quotes: "\201C" "\201D" "\2018" "\2019"; }
:lang(fr) q { quotes: "\00AB\00A0" "\00A0\00BB" "\201C" "\201D"; }
:lang(de) q { quotes: "\201E" "\201C" "\201A" "\2018"; }
:lang(es) q, :lang(it) q, :lang(pt) q, :lang(ru) q { quotes: "\00AB" "\00BB" "\201C" "\201D"; }
:lang(pl) q, :lang(nl) q { quotes: "\201E" "\201D" "\00AB" "\00BB"; }
:lang(ja) q, :lang(zh-TW) q { quotes: "\300C" "\300D" "\300E" "\300F"; }
:lang(zh) q { quotes: "\201C" "\201D" "\2018" "\2019"; }
:lang(sv) q, :lang(fi) q { quotes: "\201D" "\201D" "\2019" "\2019"; }
Notes
Applies to inline <q> elements; typed quote characters in your text are not changed.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.