• Resolved Debi

    (@burntrose)


    Trying to use qTranslate plugin with theme. I found this code to change the logo when language changes, but multiple tries, I can’t find a place to put it that works. Any idea where it should go.
    <?php if (qtrans_getLanguage() == 'en') : ?><?php bloginfo('stylesheet_directory'); ?>/images/logoENG.gif<?php else : ?><?php bloginfo('stylesheet_directory'); ?>/images/logo.gif<?php endif; ?>

    Also don’t know how the “browse” ended up in my menu and now my mini sidebar doesn’t show. It is not checked to disable.

    thanks in advance

Viewing 4 replies - 1 through 4 (of 4 total)
  • Theme Author acosmin

    (@acosmin)

    I am not familiar with qTranslate, I think you can put it in the sidebar.

    Open sidebar.php and bellow line 7 add something like:

    <aside class="side-box clearfix widget">
      <div class="sb-content clearfix">
        <h3 class="sidebar-heading"><?php _e('Change language', 'acosmin'); ?></h3>
        <?php if (qtrans_getLanguage() == 'en') : ?><?php bloginfo('stylesheet_directory'); ?>/images/logoENG.gif<?php else : ?><?php bloginfo('stylesheet_directory'); ?>/images/logo.gif<?php endif; ?>
      </div>
    </aside>

    The mini sidebar will show up only if your screen resolution is higher than 1600px (if your screen resolution is smaller, a “Browse More” button appears in the menu bar

    Please read the documentation

    Thread Starter Debi

    (@burntrose)

    I don’t have a problem with making the plugin work, totally compatible. I even got the language switcher in the menu. What I’d like to see is the logo change to the french logo when french language is chosen.
    Didn’t work in sidebar.

    I was thinking it should go in the header -when the logo is called into play.

    Line 29 in header.php

    <div class="logo">
            	<a href="<?php echo esc_url( home_url() ); ?>" title="<?php bloginfo( 'title' ); ?>" class="logo-contents<?php ac_logo_class(); ?>"><?php ac_get_logo(); ?>
    
                .....
    
                <?php endif; ?>
            </div><!-- END .logo -->

    don’t know how to add to the ac_get_logo part.
    Thanks

    Theme Author acosmin

    (@acosmin)

    Then replace:

    <a href="<?php echo esc_url( home_url() ); ?>" title="<?php bloginfo( 'title' ); ?>" class="logo-contents<?php ac_logo_class(); ?>"><?php ac_get_logo(); ?></a>

    with:

    <a href="<?php echo esc_url( home_url() ); ?>" title="<?php bloginfo( 'title' ); ?>" class="logo-contents"><?php _e( 'Your Logo Text', 'acosmin' ) ?></a>

    Now open ../languages/en_US.po and at the bottom add:

    #. Text in echo
    #: simplified/header.php:30
    msgid "Your Logo Text"
    msgstr ""

    If you make these changes, you wont be able to add a image logo.

    Thread Starter Debi

    (@burntrose)

    Ultimately it is the logo image that I want to change so that won’t work. Logo text changes by itself in the Twenty-fourteen theme. So maybe I’ll look into that one. Thanks for the support -nice theme -great support – i will definitely use it for a different site.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Language ready’ is closed to new replies.