Title: Gravity Forms
Last modified: January 10, 2018

---

# Gravity Forms

 *  [reddo](https://wordpress.org/support/users/reddo/)
 * (@reddo)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/gravity-forms-60/)
 * Any support/planned support for Gravity Forms? Would the manually translated 
   fields (`[:en][:]` syntax) still work?

Viewing 11 replies - 1 through 11 (of 11 total)

 *  [VaLeXaR](https://wordpress.org/support/users/valexar/)
 * (@valexar)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/gravity-forms-60/#post-9865056)
 * I plan this. But in paid version. It is currently in development.
 *  Thread Starter [reddo](https://wordpress.org/support/users/reddo/)
 * (@reddo)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/gravity-forms-60/#post-9865180)
 * Would the manually translated fields (`[:en][:]` syntax) still work?
 *  [VaLeXaR](https://wordpress.org/support/users/valexar/)
 * (@valexar)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/gravity-forms-60/#post-9865256)
 * Yes. It is base syntax for WP Multilang.
 *  Thread Starter [reddo](https://wordpress.org/support/users/reddo/)
 * (@reddo)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/gravity-forms-60/#post-9865267)
 * Cool, thanks a lot. I’m considering switching from `qtranslate-x` before it breaks
   the site on an update.
 *  [VaLeXaR](https://wordpress.org/support/users/valexar/)
 * (@valexar)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/gravity-forms-60/#post-9868105)
 * Use test server before.
 *  Thread Starter [reddo](https://wordpress.org/support/users/reddo/)
 * (@reddo)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/gravity-forms-60/#post-9868738)
 * That’s the plan.
 *  Thread Starter [reddo](https://wordpress.org/support/users/reddo/)
 * (@reddo)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/gravity-forms-60/#post-9886498)
 * I’ve been playing around with the plugin on a test server amd, after ironing 
   out a few problems with migration, it doesn’t seem to work with gravity forms
   at all.
 * See this screenshot: [https://goo.gl/vWU6xV](https://goo.gl/vWU6xV)
 * None of the (manually) translated fields get switched.
 *  [VaLeXaR](https://wordpress.org/support/users/valexar/)
 * (@valexar)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/gravity-forms-60/#post-9896444)
 * You need add filters before displaying strings. If it possible in Gravity Form.
 *  Thread Starter [reddo](https://wordpress.org/support/users/reddo/)
 * (@reddo)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/gravity-forms-60/#post-9896710)
 * I wrote the following function:
 *     ```
       function translate_gravity_forms( $form ) {
         $form['title'] = wpm_translate_string($form['title']);
   
         if ($form['description']) {
           $form['description'] = wpm_translate_string($form['description']);
         }
   
         foreach( $form['fields'] as &$field ) {
           $field['label'] = wpm_translate_string($field['label']);
   
           if ($field['description']) {
             $field['description'] = wpm_translate_string($field['description']);
           }
   
           if ($field['content']) {
             $field['content'] = wpm_translate_string($field['content']);
           }
   
           if ($field['choices']) {
             foreach( $field['choices'] as &$choice ) {
               $choice['text'] = wpm_translate_string($choice['text']);
             }
           }
         }
   
         return $form;
       }
       add_filter( 'gform_pre_render', 'translate_gravity_forms' );
       ```
   
 * And the fields still don’t get translated. Am I using the wrong function? which
   one should I use?
 * This is getting more complicated than it needs to be 😐
 *  Thread Starter [reddo](https://wordpress.org/support/users/reddo/)
 * (@reddo)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/gravity-forms-60/#post-9914054)
 * Any info on this?
 *  Thread Starter [reddo](https://wordpress.org/support/users/reddo/)
 * (@reddo)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/gravity-forms-60/#post-9933212)
 * To anyone concerned
 * I’ve found the correct way to translate gravity fields:
 *     ```
       function translate_gravity_forms( $form ) {
         $form['title'] = wpm_translate_string($form['title']);
   
         if ($form['description']) {
           $form['description'] = wpm_translate_string($form['description']);
         }
   
         foreach( $form['fields'] as &$field ) {
           $field->label = wpm_translate_string($field->label);
   
           if ($field->description) {
             $field->description = wpm_translate_string($field->description);
           }
   
           if ($field->content) {
             $field->content = wpm_translate_string($field->content);
           }
   
           if ($field->choices) {
             foreach( $field->choices as &$choice ) {
               $choice['text'] = wpm_translate_string($choice['text']);
             }
           }
         }
   
         return $form;
       }
       add_filter( 'gform_pre_render', 'translate_gravity_forms' );
       ```
   
 * **References:**
    [Form Object Source](https://docs.gravityforms.com/form-object/)
   [Field Object Source](https://docs.gravityforms.com/field-object/)
 * I do not give my consent to include this in a paid version of this plugin, but
   it’s ok to include it in the free version or as a standalone plugin (with attribution).
    -  This reply was modified 8 years, 2 months ago by [reddo](https://wordpress.org/support/users/reddo/).

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Gravity Forms’ is closed to new replies.

 * ![](https://ps.w.org/wp-multilang/assets/icon-256x256.png?rev=1760406)
 * [WP Multilang - Translation and Multilingual Plugin](https://wordpress.org/plugins/wp-multilang/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-multilang/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-multilang/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-multilang/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-multilang/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-multilang/reviews/)

 * 11 replies
 * 2 participants
 * Last reply from: [reddo](https://wordpress.org/support/users/reddo/)
 * Last activity: [8 years, 2 months ago](https://wordpress.org/support/topic/gravity-forms-60/#post-9933212)
 * Status: not resolved