WordPress plugin Qtranslate usage

Call language switch button:

use below codes for call a language switch button to website any site:

<?php echo qtrans_generateLanguageSelectCode(‘both’); ?>

WP site title multi-language:

  1. change title:
⌈:zh⌋站点标题⌈:en⌋Sitename  //use [] replace ⌈⌋

2. modify header.php, find

bloginfo( 'name' );

change to

echo _e(apply_filters(' ', bloginfo( 'name' )));

WP custom sub-domain multi-language
<?php echo get_post_meta(get_the_ID(), “price”, true);?>
change to
<?php echo _e(apply_filters(‘ ‘, _(get_post_meta($post->ID, ‘price’, true)))); ?>

WP home menu multi-language

<ul><li><a href=”<?php bloginfo(‘url’);?>”><?php _e(“<!–:zh–>首页<!–:–><!–:en–>Home<!–:–>”);?></a></li></ul>

WP LOGO multi-language

Codes:

<?php if(qtrans_getLanguage()=='zh'): ?>
中文内容
<?php endif; ?>
<?php if(qtrans_getLanguage()=='en'): ?>
英文内容
<?php endif; ?>

From: http://www.xuewangzhan.net/cj/6739.html

Readers Comments (3)

  1. The fans of this game are invited to visit bingo site in order
    to discover a few of the first-rated new online plays.
    Some countries keep a watch over the casinos that operate there, and you
    should limit your play to the people specific places.
    The sort of hand maybe you have in poker can be a similar regardless of what form of poker you might be collaborating in.

    Reply
  2. Hi there! Quick question that’s completely off topic. Do you know how to make your
    site mobile friendly? My web site looks weird when viewing from my iphone 4.
    I’m trying to find a theme or plugin that might be
    able to correct this problem. If you have any recommendations, please share.
    Thanks!

    Reply
  3. Magnificent site. A lot of helpful information here.
    I’m sending it to a few friends ans also sharing in delicious.
    And naturally, thank you on your effort!

    Reply

Leave a comment

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.

calf-blog-top