Forum Replies Created

Viewing 1 replies (of 1 total)
  • Quick and dirty you can indeed translate or force text replace through the add_filter function.

    Also for the I’ve read and accept’ this is possible.

    Use the following to cover both:

    add_filter('gettext', 'translate_text');
    add_filter('ngettext', 'translate_text');
    function translate_text($translated) {
    $translated = str_ireplace('Billing Details', 'Factuurgegevens', $translated);
    $translated = str_ireplace('I’ve read and accept the ', 'Ik aanvaard de ', $translated);
    $translated = str_ireplace('terms & conditions', 'voorwaarden', $translated);
    return $translated;
    }

    The “&” from “terms & conditions” should be & amp; but editor replaces the code

Viewing 1 replies (of 1 total)