Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Plugins & Atahualpa »

qTranslate resets to home language


  #1  
Old Jun 24, 2012, 09:28 AM
JulesG
 
47 posts · Sep 2011
qTranslate resets to home language

Hi !

Using WordPress 3.4, Atahualpa Theme 3.7.7 and qTranslate 2.5.29

I built my own bilingual menu (French and English) and when in English language, selecting any menu item resets the language to French. When in French, it works correctly and stays in French.

You can see it in action here:
http://="http://julesgobeil.com/phot...photo/?lang=en

A qTranslate FAQ seems to imply that it would be due to improper code in the template:

Quote:
FAQ: Clicking on the Title/Home-Link resets selected language.
This is a template problem. Your template is using get_option('home') to get the link for the front page, which is BAD! get_option is not supposed to be used in templates. There is a function called bloginfo for templates. Use that instead and everything will work the way it is supposed to.
http://www.qianqin.de/qtranslate/for...1cdb0&start=10

I'm using this HTML code:

HTML Code:
<div class="menu_container"><p class="menuitems">

	<!--:fr--><a class="menuitem" href="http://julesgobeil.com/photo/?lang=fr/">Accueil</a><!--:-->
	<!--:en--><a class="menuitem" href="http://julesgobeil.com/photo/?lang=en/">Home</a><!--:-->

	<!--:fr--><a class="menuitem" href="http://julesgobeil.com/photo/photos/?lang=fr/">Photos</a><!--:-->
	<!--:en--><a class="menuitem" href="http://julesgobeil.com/photo/photos/?lang=en/">Photos</a><!--:-->

	<!--:fr--><a class="menuitem" href="http://julesgobeil.com/photo/articles/?lang=fr/">Articles</a><!--:-->
	<!--:en--><a class="menuitem" href="http://julesgobeil.com/photo/articles/?lang=en/">Articles</a><!--:-->

	<!--:fr--><a class="menuitem" href="http://julesgobeil.com/photo/bio/?lang=fr/">À propos</a><!--:-->
	<!--:en--><a class="menuitem" href="http://julesgobeil.com/photo/en/bio/?lang=en/">About</a><!--:-->

	<!--:fr--><a class="menuitem" href="http://julesgobeil.com/photo/services/?lang=fr/">Services</a><!--:-->
	<!--:en--><a class="menuitem" href="http://julesgobeil.com/photo/en/services/?lang=en/">Services</a><!--:-->

	<!--:fr--><a class="menuitem" href="http://julesgobeil.com/photo/contact/?lang=fr/">Contact</a><!--:-->
	<!--:en--><a class="menuitem" href="http://julesgobeil.com/photo/en/contact/?lang=en/">Contact</a><!--:-->

</p></div>
Can you help ?
  #2  
Old Jun 24, 2012, 11:53 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Please go to ato->export/import settings export your settings and attach them to a reply
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Jun 24, 2012, 12:40 PM
JulesG
 
47 posts · Sep 2011
Thanks for helping me. Here is the requested file

Regards
J
Attached Files
File Type: txt ata-julesgobeilcom-20120624.txt (25.0 KB, 1404 views)
  #4  
Old Jun 24, 2012, 01:16 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
This is another sad case of computers doing exactly what you told them to do, not what you want them to do. If you go to ato->Add HTML/CSS Inserts->HTML Inserts: Body Top I see you have MANUALLY created a menu in French, so Atahualpa is not doing anything about the menu, you have already constructed it.

p.s. I'd like to know why they think the get_option shouldn't be used. the codex states
Quote:
Function Reference/get option
A safe way of getting values for a named option from the options database table. If the desired option does not exist, or no value is associated with it, FALSE will be returned.
and if you look, the FAQ entry is from 2008!
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Last edited by juggledad; Jun 24, 2012 at 01:53 PM.
  #5  
Old Jun 24, 2012, 01:49 PM
JulesG
 
47 posts · Sep 2011
Hi Juggledad,

Thanks for your reply.

This is exactly what I write in my first post and I even give the HTML code for the menu I created. If you look at the code, you will see that it contains qTranslate language tags to make it bilingual.

This is the menu that doesn't work properly in English. When switching to a different menu item, the language reverts to French. Try it, the URL is in the first post.

Thanks for helping me.

Regards
J
  #6  
Old Jun 24, 2012, 01:56 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
what you have in teh css inserts is
HTML Code:
<mycode>

	<div class="logo_container">
		<h1 class="logo"><a href="http://julesgobeil.com/site_web_3/"></a></h1>
	</div>
	<nav>
		<div class="menu_container"><p class="menuitems">
<a class="menuitem" href="http://julesgobeil.com/photo/?lang=fr/">Accueil</a>
<a class="menuitem" href="http://julesgobeil.com/photo/photos/?lang=fr/">Photos
<a class="menuitem" href="http://julesgobeil.com/photo/articles/?lang=fr/">Articles</a>
<a class="menuitem" href="http://julesgobeil.com/photo/bio/?lang=fr/">À propos</a>
<a class="menuitem" href="http://julesgobeil.com/photo/services/?lang=fr/">Services</a>
<a class="menuitem" href="http://julesgobeil.com/photo/contact/?lang=fr/">Contact</a>
		</p></div>
	</nav>

</mycode>
I see NO 'lang=en' in that.

just where do you think you have the code you reference?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change header image depending on language (using qTranslate) ? marsyg Header configuration & styling 5 Dec 27, 2010 08:58 AM
Titles appear in one language only with qTranslate anneks Plugins & Atahualpa 3 Oct 21, 2009 08:25 AM
qtranslate incompatibility Kolya Languages & Translations 0 Jul 21, 2009 03:56 PM
Put the qTranslate language selector into the header or page menu DarrenNI Header configuration & styling 1 Jun 19, 2009 04:01 AM


All times are GMT -6. The time now is 02:01 AM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.