• Resolved bolingbroke

    (@bolingbroke)


    Hey there,
    love the plugin so far!

    I have one little question: I need the custom form fields’ placeholder names to change depending on the website’s language. I’m using WPML to handle the languages, but it seems like it can only translate the plugin itself, not my own custom input. Is there a way to either translate it or to use different field configurations depending on the language?

    Thank you for your help!

Viewing 1 replies (of 1 total)
  • Plugin Author mkscripts

    (@mkscripts)

    Hi there,

    Thank you! We are glad to hear you like our plugin.

    When you create a form field, a new option is added to the database. These options are not present in advance and are therefore somewhat more difficult to translate, but it is possible with WPML.

    Lets say you have created 3 form fields: Email, First Name and Last Name. Based on these names, the keys are based in the database, as in this example first_name_label etc.. (using lowercase letters and underscores)

    The database option “dae_fields” contains (after creating the form fields) the array( ’email_label’ => ‘Email’, ‘first_name_label’ => ‘First Name’, ‘last_name_label’ => ‘Last Name’ )

    You can let WPML know about these fields by adding the following code to Dashboard → WPML → Settings → Custom XML configuration tab.

    <wpml-config>
        <admin-texts>
            <key name="dae_fields">
                <key name="email_label"/>
                <key name="first_name_label"/>
                <key name="last_name_label"/>
            </key>
        </admin-texts>
    </wpml-config>

    – Add this code (customized) to the text field.
    – Press the Save button.
    – Go to Dashboard → WPML → String Translation.
    – Add the translation to the new elements.

    Kind regards,
    Team Download After Email

Viewing 1 replies (of 1 total)

The topic ‘Translate Custom Form Fields (DAE Plus)’ is closed to new replies.