How to translate content in category.php or index.php with qtranslate?

I was wondering how to translate content under index.php (or category.php with qtranslate?). I’m using twenty twelve theme. My code on index.php: <?php /** * The main template file. * @package WordPress * @subpackage Twenty_Twelve * @since Twenty Twelve 1.0 */ ?> <?php get_header(); ?> <?php $page_id = 1500; $page_data = get_page( $page_id ); echo … Read more

Multi-language permalink in qtranslate

I am using qtranslate plugin for my WordPress site to make it a multi-language site. Now I have got a requirement like For English the url should look like www.sitename.com/contact-en For French the url should look like www.sitename.com/fr/contact-fr How can I accomplish this? (qTranslate is the plugin used) Note: There should not be any post … Read more

Disable qTranslate by post type in admin + disable per page / post ID on front-end [closed]

Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for WordPress Development Stack Exchange. Closed 7 years ago. Improve this question I’m trying to find a way to selectively disable qTranslate – I would like to be able to show certain static … Read more

Titles in my sidebar widget appear in all languages – with qtranslate

So here’s my code, using the qTranslate plugin: query_posts(array(‘post_type’ => ‘uk_blog’, ‘numberposts’ => 2)); $i = 0; while(have_posts()): the_post($post);?> <div class=”third-column”<?php if ($i == 1) echo ‘ style=”margin-right:0;”‘;?>> <h2><a href=”https://wordpress.stackexchange.com/questions/65136/<?php get_permalink($post->ID);?>”><?php the_title();?></a></h2> <div class=”inner”> <?php $length = strlen(get_the_content()); echo nl2br(substr(strip_tags(get_the_content()), 0, 500)); if ($length > 500){ echo ‘…<br /><a href=”‘ . get_permalink($post->ID) . ‘”>Read more</a>’; … Read more

Difference between bloginfo(‘home’) and home_url() and site_url()

I have been reading through Codex and other SO and SE posts regarding this. But I am confused. I used home_url() and site_url() to linking the site’s home and it gave same results. As I was using qTranslate for bilingual implementation. And had its language switcher. Found later, when clicked on the home logo (used … Read more

Has anyone successfully integrated qtranslate with custom metaboxes?

I followed this tutorial to create custom metaboxes. It seems like qtranslate enables you to use shortcodes almost everywhere. For example: Post titles: <!–:en–>Cheng Feng Enterprises<!–:–><!–:zh–>鄭峰企業<!–:–><!–:es–>Cheng Feng Compania<!–:–> Widgets: [:en]My name is Alex Chen. I provide Spanish-English-Chinese translation services in Taiwan. <a href=”https://wordpress.stackexchange.com/questions/25052/mailto:[email protected]”><strong>I’m available for hire</strong></a>. [:zh]我的名字是亞歷陳。 我提供西班牙語 – 英語 – 中國 在台灣的翻譯服務。 <a href=”https://wordpress.stackexchange.com/questions/25052/mailto:[email protected]”><strong>我可供租用</strong></a>. … Read more

How to determine current active language in qtranslate plugin? [closed]

Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for WordPress Development Stack Exchange. Closed 7 years ago. Improve this question I have a situation where I want to give specific style to my Navigation Menu when the website is in German … Read more

Adding a filter to qTranslate to change display of language chooser

This is a problem I am having with qTranslate, but I suppose the solution is more of an instruction in how WordPress hooks and filters work. Instead of using the qTranslate widget, I am using the hook <?php echo qtrans_generateLanguageSelectCode(‘text’);?> to call the language chooser in my header and then modifying its appearance in my … Read more

How to force WordPress to temporarily switch locale (using qTranslate)? [closed]

Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for WordPress Development Stack Exchange. Closed 7 years ago. Improve this question I have a multi-language store running WooCommerce and qTranslate, and am trying to setup multi-language customer emails. The problem is, the … Read more

Translate widget titles using qTranslate plugin

I’m actually using the qTranslate plugin to translate my website. It works really well with everything except one thing. the titles of my sidebar widgets. Actually, to translate some words we need to put tags like this: <!–:en–>My English Title<!–:–><!–:fr–>My French Title<!–:–> When I use this in the content of my widget it works well. … Read more