WordPress.org

Ready to get started?Download WordPress

Forums

qTranslate
translating gravity forms (2 posts)

  1. ccorey11
    Member
    Posted 2 years ago #

    Hi guys!

    thought I found a fix to translating gravity forms with qtranslate but not working:

    this is the code I used in my functions.php:

    add_action("loop_start", "qtrans_gravityform_filters"); function qtrans_gravityform_filters(){ add_filter("gform_name_first", "qtrans_gravityform_name_first"); add_filter("gform_name_last", "qtrans_gravityform_name_last"); add_filter("gform_name_suffix", "qtrans_gravityform_name_suffix"); add_filter("gform_address_street", "qtrans_gravityform_address_street"); add_filter("gform_address_street2", "qtrans_gravityform_address_street2"); add_filter("gform_address_city", "qtrans_gravityform_address_city"); add_filter("gform_address_state", "qtrans_gravityform_address_state"); add_filter("gform_address_zip", "qtrans_gravityform_address_zip"); add_filter("gform_address_country", "qtrans_gravityform_address_country"); }
    
    function qtrans_gravityform_name_first($label){ return __('[:en]Firstname[:es]nombre'); } function qtrans_gravityform_name_last($label){ return __('[:en]Surname[:es]ingerman'); } function qtrans_gravityform_name_suffix($label){ return __('[ :en]Suffix[:es]ingerman'); } function qtrans_gravityform_address_street($label){ return __('[:en]Street[:es]ingerman'); } function qtrans_gravityform_address_city($label){ return __('[:en]City[:es]ingerman'); } function qtrans_gravityform_address_state($label){ return __('[ :en]County[:es]ingerman'); } function qtrans_gravityform_address_zip($label){ return __('[:en]Postcode[:es]ingerman'); } function qtrans_gravityform_address_country($label){ return __('[ :en]Country[:es]ingerman'); }

    now i have alot of other fields to translate. What names do i put in there, the title of the field (i.e. are we in your area?)...also the translation words are not in the above script except the first "nombre"

    could you help me clean this up or give me another solution?

    thanks

    -c-

    http://wordpress.org/extend/plugins/qtranslate/

  2. alexleonard
    Member
    Posted 1 year ago #

    It looks like someone wrote a plugin to get around this issue:

    https://github.com/mweimerskirch/wordpress-qtranslate-support-for-gravityforms

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic