WordPress.org

Ready to get started?Download WordPress

Forums

WP-TopBar
[resolved] WP-Topbar 4.0: no longer supports qtranslate (4 posts)

  1. mailbeez
    Member
    Posted 1 year ago #

    As of the latest release multilingual top-bars are no longer supported

    before with
    [:en]english[:de]german

    different text could be defined.

    Also the alternative syntax does not work:
    <!--:en-->english<!--:--><!--:de-->german<!--:-->

    In the previous version it worked fined.

    Would be great if you put the support for qtranslate back into wp-topbar

    http://wordpress.org/extend/plugins/wp-topbar/

  2. Bob
    Member
    Plugin Author

    Posted 1 year ago #

    That is odd -- there was no change to how the HTML was created.

    I looked up qtranslate and found how to add explicit support for their plugin. I tested it on one of my sites.

    This feature will come out in the next release of my plugin.

    To patch version 4.00, edit wp-topbar.php.

    Look for the function wptb_display_TopBar. Add the following code:

    if(function_exists('qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage')) {
    			$wptbOptions['bar_text'] = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($wptbOptions['bar_text']);
    			$wptbOptions['bar_link_text'] = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($wptbOptions['bar_link_text']);
    			$wptbOptions['bar_link'] = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($wptbOptions['bar_link']);
    
    		}

    Before this line of code:

    echo '<p id="wptbheadline" style="',$wptb_visibility;

    This should be around line 197.

    Let me know if this works for you.

    Bob

  3. mailbeez
    Member
    Posted 1 year ago #

    hi bob,

    thanks a lot for fixing the issue! it works again with your patch!

    cord

  4. Bob
    Member
    Plugin Author

    Posted 1 year ago #

    Great!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags