Developer documentation

Languages

The widget currently ships English and German.
It picks the language in this order: the lang attribute on the widget element, the nearest lang attribute above it (usually <html lang="…">), the browser language, English.

HTML
<html lang="de">\n  <!-- widgets below are German -->\n</html>\n\n<!-- force a language on one widget -->\n<div class="cdp-captcha" data-sitekey="YOUR_SITEKEY" lang="en"></div>

From JavaScript use the language option of createWidget().
Unsupported codes fall back to English.

Adding a language

The texts live in the TEXTS table at the top of core/assets/js/cdp-captcha.js (nine short strings).
Add a block for the new code and send it to us;
we include it in the next release.