Docs & Support

Learn about all the Formidable features and get support from our amazing customer success team.

Polylang

Translate your forms into multiple languages using Polylang and the Formidable Polylang add-on.

Download and Install

To access this add-on, ensure you have the Business license or above.
  1. Install the Polylang plugin.
  2. If you haven't already, install and activate the current version of Formidable Forms Premium on your WordPress site.
  3. After confirming your Formidable Forms license, proceed to the Formidable → Add-Ons page and toggle on the Formidable Polylang add-on.
    Install the Polylang add-on

Formidable Forms makes advanced site building simple. Launch forms, directories, dashboards, and custom WordPress apps faster than ever before.

Translate a form

After the Polylang plugin and the Formidable Polylang add-on are activated, you may follow the steps below to translate your forms.

  1. Go into the form that you would like to translate.
  2. For best results, add separate saved values that are different than your option labels for any checkbox, radio or dropdown fields.
  3. Click on the Translate Form button under your form Settings → General page.
    Polylang Translate Form Button
  4. Enter your translations and click the Save Changes button.
    Polylang Enter Translation
  5. Publish your form on a page and use Polylang to translate into any other languages you would like.
    Polylang Translate Form Publish Page

Sending translated emails

You must set up different email actions to send the correct email for each language. Each of these emails will be sent conditionally based on the language submitted.

  1. First, you'll need a shortcode to get the current language. Activate this code snippet and add it to your theme functions.php or inside the WPCode plugin.
  2. Now, add a hidden field to your form. Use [get_current_language] as the default value.
    Add hidden field in Polylang form
  3. In your form Settings → Actions & Notifications, add an email action for each language you want to translate.
    Add Polylang email Action for each language to be translated
  4. To prevent every email from being sent, add conditional logic to each email action. This will ensure that the correct email notification is sent based on the recipient's language preference. For example, use en for English and fr for French. Your conditional logic will look like this:
    Add conditional logic to each Polylang email Action

Translate confirmation message

To translate the confirmation message shown after form submission, you must add a confirmation action for each language. These confirmation actions will be triggered according to the language selected during submission.

  1. To get the current language, add a hidden field to your form.
  2. Activate this code snippet and use [get_current_language] as the default value for your hidden field.
    Add hidden field in Polylang form
  3. In your form Settings → Actions & Notifications, add a confirmation action for each language you want to translate. Select the Show Message button to customize the message and add it to your translation.
    Add Polylang Confirmation Action for each language to be translated
  4. Add conditional logic to each confirmation action to ensure the correct success message is sent depending on the language. For example, use en for English and fr for French. Your conditional logic will look like this:
    Add conditional logic to each Polylang Confirmation Action

Translate a value for display

You may want to translate a value before display. If you have already translated field labels and options, there is no need to translate them again. In a view, you can use [translate_value value="[25]"] or [translate_value value="[25 show=field_label]"]. Be sure to add the following code to your site.

add_shortcode( 'translate_value', 'trans_val_func' );
function trans_val_func( $atts, $content = '' ) {
  $atts = shortcode_atts( array( 'value' => '' ), $atts );
  $value = pll__( $atts['value'] );
  return $value;
}

Import and export translations

Formidable doesn't manage the translations when importing/exporting forms. You can import and export string translations directly in Polylang.

Troubleshooting

Many issues with translations can be resolved by making sure to set different saved values for option fields like checkboxes, radio buttons, and dropdowns. Learn more about adding separate saved values.

Additional customizations

Learn where to put the code when adding a custom PHP function to your site.

Get the current language

Use the code snippet below to display the current language using the [get_current_language] shortcode.

Use [get_current_language] to get the current language by adding the code below.

add_shortcode('get_current_language', 'polylang_get_lang');
function polylang_get_lang() {
  return pll_current_language('slug');
}

Translate error message

Use this code example to translate the "The username field is empty" error message when Polylang is active and not set to English. It uses a custom function get_custom_login_message that returns a French translation.

add_filter('frmreg_login_error', 'translate_pll_login_error');
   function translate_pll_login_error( $message ) {
      if ( ! function_exists( 'pll_current_language' ) ) {
         return $message;
         }

         if ( 'The username field is empty.' === $message ) {
            $current_language = pll_current_language();
            if ( 'en' !== $current_language ) {
               $custom_message = get_custom_login_message( $current_language );
               if ( false !== $custom_message ) {
                  $message = $custom_message;
               }
            }
         }

         return $message;
   }

   function get_custom_login_message( $language ) {
      switch ( $language ) {
         case 'fr': return "Le champ du nom d'utilisateur est vide.";
      }
 
      return false;
   }
Was this article helpful? *

This article may contain affiliate links. Once in a while, we earn commissions from those links. But we only recommend products we like, with or without commissions.

In this article
    Image

    We have a small, but amazing team of dedicated people who are committed to helping you achieve your goals and project requirements.


    Copyright © 2025 Strategy11, LLC. Formidable Forms® is a registered trademark Strategy11, LLC.

    Complete your purchase
    Special offer unlocked.
    Get 55% OFF!
    Complete Purchase
    Join 400,000+ using Formidable Forms to create form-focused solutions fast. Get Formidable Forms