Support » Plugin: cformsII » Translation User Verification Q & A

  • Hello,
    I upgrade cforms2 after three months with an old version (to ensure usability for a important form).

    I use qtranslateX to manage translation of my forms, it works well, but on update I get a problem with the antispam Q/A functionality : the question is anymore translated.
    I correct this by changing l.104 of cforms-captcha.php from
    $label = stripslashes(htmlspecialchars($q[1]));
    to
    $label = stripslashes(htmlspecialchars(__($q[1])));

    Maybe it should be important to translate every strings of cform with __() ?

    Regards,
    A.

    https://wordpress.org/plugins/cforms2/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author bgermann

    (@bgermann)

    No, dynamic strings given by the are not supposed to be translated with gettext. I do not know why you have this issue. Most probably it depends on the filter order (qtranslateX filtering the strings before cforms’ output). You should give more details. What is your exact question string?

    Thread Starter aureleduda

    (@aureleduda)

    Sorry for the delay :
    My question string is
    <!–:fr–>Combien font quatre plus trois (en chiffres)<!–:–><!–:en–>four plus three (digits only)<!–:–

    to enable qtranslate to translate the question string for english people.
    I use it in every strings on my form, but it fails on captcha and is resolved using the trick I purpose in the first message.

    form in French : http://mfpp-origami.fr/fr/accueil/contact/
    ethe same in english translate by qtranslateX (and the trick I purpose : http://mfpp-origami.fr/en/accueil/contact/

    Plugin Author bgermann

    (@bgermann)

    Would qtranslateX process it correctly if you remove the stripslashes and htmlspecialchars calls like $label = $q[1];? Maybe it does not filter because of the littler than and greater than being converted to < and >?

    Plugin Author bgermann

    (@bgermann)

    * … being converted to < and >?

    Plugin Author bgermann

    (@bgermann)

    * … being converted to the HTML replacements for those that are converted in this forum?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Translation User Verification Q & A’ is closed to new replies.