Halloween Sale 15% off Ends in See the plans
CSS

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.

Don’t have WPIDE yet? Install it on your site

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

  1. Install WPIDE on your WordPress site (it is free) and open Code Snippets.
  2. Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
  3. It is added inactive: review the code and settings, then switch it on.

Have a snippet worth sharing?

Publish it to the library from WPIDE or right here. Sign in with any WordPress site that runs WPIDE, free or Pro. Public snippets are reviewed by the WPIDE team before they appear.

Which site should get this snippet?

Enter the address of your WordPress site. WPIDE opens there in a new tab with the snippet ready to review and save.

Remembered in this browser only, so you are asked once.

Report this snippet

Tell the WPIDE team what is wrong: broken code, something harmful, spam or copied work.