WordPress.org

Ready to get started?Download WordPress

Forums

Visual Form Builder
[resolved] Localization of address block (8 posts)

  1. wp_hela
    Member
    Posted 1 year ago #

    Matthew,

    a great piece of work you did.

    Do you think you could change these lines in the address block (around line 2244 in visual-form-builder.php) to make these labels available for localization with Poedit or others?

    <label for="' . $id_attr . '-address">' . __( 'Address' , 'visual-form-builder') . '</label>
    
    <label for="' . $id_attr . '-address-2">' . __( 'Address Line 2' , 'visual-form-builder') . '</label>
    
    <label for="' . $id_attr . '-city">' . __( 'City' , 'visual-form-builder') . '</label>
    
    <label for="' . $id_attr . '-state">' . __( 'State / Province / Region' , 'visual-form-builder') . '</label>
    
    <label for="' . $id_attr . '-zip">' . __( 'Postal / Zip Code' , 'visual-form-builder') . '</label>
    
    <label for="' . $id_attr . '-country">' . __( 'Country' , 'visual-form-builder') . '</label>

    Regards from German speaking Austria ;-)

    http://wordpress.org/extend/plugins/visual-form-builder/

  2. Matthew Muro
    Visual Form Builder Pro
    Plugin Author

    Posted 1 year ago #

    This has already been localized in the Pro version, I just haven't had a chance to work on the free version.

  3. wp_hela
    Member
    Posted 1 year ago #

    I see ;-)

    Is there a german .po File in the pro version or do I have to translate again?

  4. Matthew Muro
    Visual Form Builder Pro
    Plugin Author

    Posted 1 year ago #

    There's not an existing German translation in the Pro version, but adding those translation files is something I'd love to do.

  5. wp_hela
    Member
    Posted 1 year ago #

    Matthew,

    I purchased the Pro Version.

    I took the visual-form-builder-pro.pot template from the languages directory.

    I made my visual-form-builder-pro-de_DE.po and visual-form-builder-pro-de_DE.mo with POEdit.

    Unfortunately it seems. as the .po/.mo is ignored by the Pro version.

    Any idea?

  6. wp_hela
    Member
    Posted 1 year ago #

    Ok, I found the problem ... the multi language plugin qTranslate interferes with Visual Form Builder.

    Is there a solution for this problem?

  7. wp_hela
    Member
    Posted 1 year ago #

    These lines do the trick:

    function visual_form_builder_init() {
      load_plugin_textdomain( 'visual-form-builder-pro', false , 'visual-form-builder-pro/languages' );
    }
    add_action('init', 'visual_form_builder_init');

    Hmmm ... seems I'm talking to myself here *gg*

    Hope this helps someone with the same problems ;-)

  8. baev
    Member
    Posted 1 year ago #

    I also have qTranslate but the above code doesn't work for me.

    The only hack that helped in my case is to insert the new method in class Visual_Form_Builder (in visual-form-builder.php file):

    public function localize_vfb() {
                     $plugin_dir = basename(dirname(__FILE__));
                     load_plugin_textdomain( 'visual-form-builder', false, $plugin_dir. '/languages/' );
            }

    and call it in function __construct():

    add_action('plugins_loaded', array( &$this, 'localize_vfb' ));

    My attempts to resolve this through functions.php file didn't succeed.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic