Home Link leads to fallback language

Any suggestions on how to improve qTranslate? Post here!

Home Link leads to fallback language

Postby mcguffin » Mon May 02, 2011 10:23 am

Hi there!

First things first: thank you very much for the qTranslate-plugin :)

I ran into minor issue while using WordPress as a CMS.
In the main menu the URL to the home page doesn't lead to the translated version of the page (should be http://domain.com/LANG) but just to the default page (http://domain.com).

After a short investigation, I could resolve this issue by adding the line:
Code: Select all
add_filter('home_url', 'qtrans_convertURL');

into my theme.

Maybe this information can be useful for somebody ...

best regards
joern
mcguffin
 
Posts: 1
Joined: Mon May 02, 2011 10:10 am

Re: Home Link leads to fallback language

Postby testforum » Sat Jun 18, 2011 4:28 am

where did you put it exaclty

ca you give file name
testforum
 
Posts: 7
Joined: Wed Jun 01, 2011 10:09 pm

Re: Home Link leads to fallback language

Postby pan77 » Mon Jun 20, 2011 8:58 pm

I'm using qTranslate with the 2010 Weaver theme. I added the above-mentioned code to functions.php in wp-content/themes/2010-weaver/functions.php. I put it at the end of the file, just before ?> and it worked.
pan77
 
Posts: 2
Joined: Mon Jun 20, 2011 8:45 pm

Re: Home Link leads to fallback language

Postby schnaggs » Tue Jun 21, 2011 3:32 am

pan77 wrote:I'm using qTranslate with the 2010 Weaver theme. I added the above-mentioned code to functions.php in wp-content/themes/2010-weaver/functions.php. I put it at the end of the file, just before ?> and it worked.


I tried this, too, and it fixed the home menu button link problem. The problem I'm now having is that the filter entry somehow messes with Wordpress' loading of the pretty links for the translated pages (www.mysite.com/ru, for instance). I'll get the "page not available" post. Thoughts?
schnaggs
 
Posts: 1
Joined: Tue Jun 21, 2011 3:28 am

Re: Home Link leads to fallback language

Postby testforum » Thu Jun 23, 2011 3:54 pm

no

i added the code in my theme

<?php
add_action('admin_init', 'mytheme_add_init');
add_action('admin_menu', 'mytheme_add_admin');


add_filter('home_url', 'qtrans_convertURL');
?>

no result whatsoever still back to english

any othere change somewhere else
testforum
 
Posts: 7
Joined: Wed Jun 01, 2011 10:09 pm

Re: Home Link leads to fallback language

Postby yaufent » Sat Jul 02, 2011 4:22 am

I agree with, the potential is HUGE with qtrans working fluidly for the common end user.
Businesses and individuals do not know the gigantic market they are missing out by publishing a monolingual site.
yaufent
 
Posts: 3
Joined: Sat Jul 02, 2011 4:06 am

Re: Home Link leads to fallback language

Postby reg123 » Tue Jul 05, 2011 2:34 am

i'm using Twenty Ten and put the add_filter('home_url', 'qtrans_convertURL'); at the end of link-template.php file before the php closed tag ?> and it is worked :). thank you so much.
reg123
 
Posts: 1
Joined: Tue Jul 05, 2011 2:28 am

Re: Home Link leads to fallback language

Postby hx_xoxo » Thu Jun 28, 2012 1:14 am

thank you so much for this :D
hx_xoxo
 
Posts: 1
Joined: Thu Jun 28, 2012 1:13 am


Return to qTranslate Suggestions Forum

Who is online

Users browsing this forum: Google [Bot] and 1 guest