• Hi, first of all – congratulations for a very interesting plugin.

    I have been trying to make translations/languages work on my webpage. It is mandatory that I have the same form in two languages available. I have been playing with ?hl=xx parameter, which, to my surprise, works (to some extent). This ‘extent’ is limited to the phrase “Required*” at the beginning of the form and Submit button. (My surprise deepened when I discovered that ?hl=xx parameter does not change the output of the form if used in ‘standalone’ version, out of the box from Google. Weird – nevertheless, back to my question.)

    I would like to know if it is possible to enable translation for other parts of the form, i.e. “What is” in CAPTCHA or error messages? I managed to create *.po and *.mo files for my language, but the translation works only in options and settings (not every string is defined, though).

    In wordpress form page source I see ‘required’ messages in proper language, but they are displayed on the webpage in English. I am a total layman, but maybe it has something with wpgform_script_vars in javascript, which are defined in English and supposedly override translation.

    https://www.ads-software.com/plugins/wpgform/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Mike Walsh

    (@mpwalsh8)

    Lots of questions …

    The ?hl=xx URL parameter only affects the a few portions of the form, notably the buttons. Google will not translate any of the form field questions or help text.

    Is it possible to translate the other portions of the form, notably the error messages and other prompts generated by the plugin? Yes, it should be possible. I have tried to make sure all of the strings are setup for translation but I miss a few here and there.

    Making sure Javascript text is correctly set up for translation is tricky and I think I did it right but it has never been fully flushed out. If you want to help me flush it out I would welcome it although my availability through next Wednesday (1/23) is very limited.

    I’m testing the plug-in and find that the submit button and the “* required” message are showing in German. Any suggestions?

    Plugin Author Mike Walsh

    (@mpwalsh8)

    Have you tried adding the ?hl=XX parameter (where XX is your desired language code) to your Google Forms URL?

    The exact syntax of the hl=XX parameter varies depending on the URL format of your form. If your URL ends in “/viewform” then you would add the parameter preceded by a question mark (?hl=XX) however if you have the older URL format then you add it with an ampersand (&hl=XX).

    If you look on my web site for “hl=” in the posts you’ll find a number of posts which have covered this subject.

    Excellent! Just sticking code based on your example works perfect. Thanks!

    [gform form='https://docs.google.com/spreadsheet/viewform?hl=fr&formkey=dE56R1ZldXo4a0N3VTNMNEpSemdGV3c6MQ#gid=0' email='off']

    Plugin Author Mike Walsh

    (@mpwalsh8)

    I strongly recommend not using the “gform” shortcode to display your forms as I have deprecated it and haven’t added new features to it in quite a while.

    Instead, define your form using the UI on the Dashboard (look for the Google Forms menu item) and the “wpgform” shortcode.

    maysky

    (@maysky)

    Mike,
    I have an issue. Randomly I started seeing form being posted properly, but buttons will be in a random different language (arabic in my case). Any idea why would that be? If im just looking at the form in the browser – without embedding it – it shows properly in english.
    Thanks!

    Plugin Author Mike Walsh

    (@mpwalsh8)

    Did you read through any of the links I posted earlier in this thread?

    The answer is the same regardless of the language. You need to add the “hl=XX” parameter to your Google Forms URL. How you add it depends on the format of your Google Forms URL as Google changed it about a year ago, maybe more.

    See FAQ question #2 for more explicit details.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Form languages and translation’ is closed to new replies.