Translating Formidable Conversational Forms

At the time of writing, the Formidable Forms plugin is available in 8 languages (which have reached the minimum of 90% translation completion required for generation of the language files), and has reached 3% for Arabic.

Formidable Forms integrates well with most translation plugins for translation of form fields. Formidable Forms Pro includes numerous premium addons which are not themselves translated, nor can they be included in the Glotpress translation system as they are paid addons. This means that after activating the Conversational Forms addon, you will be find two strings of particular importance which are not registered with your chosen translation plugin: the start button text and the continue button text.

Conversational Forms settings

If you are only using a form in a single language, this is not a problem – you can simply change the button text in the new Conversational Forms section in the form settings. But what if you are using the same form in more than one language? There are two steps to get it working:

  1. Translate the strings using PoEdit.
  2. Make the plugin use them.

1. Translation

Firstly you will need to download the translation template file formidable-chat.pot from your website via FTP. You can find it under /wp-content/plugins/formidable-chat/languages/.

You can open this using the free program PoEdit, which has versions for Mac, Windows, and Linux, and then click on Create New Translation and choose your language.

PoEdit (Mac version)

Next add translations for all the terms, or just for the words Start and Continue, and save the file. It will generate two files: [lang].mo and [lang].po where [lang] is the 2-letter abbreviation for your chosen language.

Rename these by appending formidable-chat- to the beginning, e.g. for Arabic and formidable-chat-ar.po and upload them into the plugin languages folder from where you downloaded the .pot file.

2. Making it work

Formidable Conversational Forms will not automatically start using your translation just yet. I’ll explain why. Initially I suspected it was a server cache issue, but after examining the code, I noticed the following snippet (which, being an insignificant part of the whole, I think it should be okay to share here).

Code for start button text

For those who don’t speak PHP, this tells us that the addon will always use the text entered in the form options unless it finds a blank value, at which time it will revert to the default text “Start” which is displayed using the WordPress translation function. So if it finds a .mo file for the current language, it will return the translated “Start” text; otherwise it will return the word “Start” in English.

Therefore, all we have to do to activate our translated strings is to open the form options, clear both fields, and hit save.

Blank fields for continue and start button text

Please note that the words Continue and Start will re-appear immediately on the options page, but don’t worry – the blank values have been saved; it’s just because of the way the form has been written, which means if it doesn’t find anything saved, it displays the default value instead of the (blank) saved value.

Code fragment from the settings page

Finally, refresh the page where you have inserted your form, and you will find the buttons are now translated.

Leave a Reply