Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1088244
    dabbevdbrand
    Participant

    Hi Guys,

    can you tell me the best way to make my xthemed website in english AND dutch, with a flagbutton switch in the header.

    Thanks!

    #1088478
    Joao
    Moderator

    Hi There,

    Below are a couple of alternative translation methods, both being plugins, that you can use from within the WordPress admin area to translate themes and plugins.

    WPML – X includes built in integration with WPML and works flawlessly straight out of the box, if you already have WPML installed, you can read about translating a theme with WPML here.

    qTranslate X – A free alternative to WPML, offering the ability to translate WordPress themes and plugins from the WordPress admin.

    Hope that helps

    Joao

    #1091504
    dabbevdbrand
    Participant

    Thanks Ill try some of these!

    #1091516
    Rue Nel
    Moderator

    Please let us know then!
    If you need anything else we can help you with, don’t hesitate to open another thread.

    #1091520
    dabbevdbrand
    Participant

    I tried qtranslatex but cant seem to add the language switch in the header 🙁

    Any chance you know how to do this?

    #1091528
    Christopher
    Moderator

    Hi there,

    Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    Copy _navbar.php from framework/views/global and put it in the same path inside child theme, replace existing code with following :

    <?php
    
    // =============================================================================
    // VIEWS/GLOBAL/_NAVBAR.PHP
    // -----------------------------------------------------------------------------
    // Outputs the navbar.
    // =============================================================================
    
    $navbar_position = x_get_navbar_positioning();
    $logo_nav_layout = x_get_logo_navigation_layout();
    $is_one_page_nav = x_is_one_page_navigation();
    
    ?>
    
    <?php if ( ( $navbar_position == 'static-top' || $navbar_position == 'fixed-top' || $is_one_page_nav ) && $logo_nav_layout == 'stacked' ) : ?>
    
      <div class="x-logobar">
        <div class="x-logobar-inner">
          <div class="x-container max width">
            <?php x_get_view( 'global', '_brand' ); ?>
          </div>
        </div>
      </div>
    
      <div class="x-navbar-wrap">
        <div class="<?php x_navbar_class(); ?>">
          <div class="x-navbar-inner">
            <div class="x-container max width">
              <?php x_get_view( 'global', '_nav', 'primary' ); ?>
              <?php echo qtrans_generateLanguageSelectCode('both'); ?>
            </div>
          </div>
        </div>
      </div>
    
    <?php else : ?>
    
      <div class="x-navbar-wrap">
        <div class="<?php x_navbar_class(); ?>">
          <div class="x-navbar-inner">
            <div class="x-container max width">
              <?php x_get_view( 'global', '_brand' ); ?>
              <?php x_get_view( 'global', '_nav', 'primary' ); ?>
               <?php echo qtrans_generateLanguageSelectCode('both'); ?>     
            </div>
          </div>
        </div>
      </div>
    
    <?php endif; ?>

    Check this link : http://developer.infoymas.com/php/change-qtranslate-text/

    Hope it helps.

  • <script> jQuery(function($){ $("#no-reply-1088244 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>