WordPress.org

Ready to get started?Download WordPress

Forums

JustWrite
[resolved] Language ready (5 posts)

  1. burntrose
    Member
    Posted 5 months ago #

    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

  2. acosmin
    Member
    Theme Author

    Posted 5 months ago #

    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

  3. burntrose
    Member
    Posted 4 months ago #

    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

  4. acosmin
    Member
    Theme Author

    Posted 4 months ago #

    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.

  5. burntrose
    Member
    Posted 4 months ago #

    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.

Reply

You must log in to post.

About this Theme

About this Topic