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:
I'm using this HTML code: HTML Code:
<div class="menu_container"><p class="menuitems"> |
Please go to ato->export/import settings export your settings and attach them to a reply
|
1 Attachment(s)
Thanks for helping me. Here is the requested file
Regards J |
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:
|
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 |
what you have in teh css inserts is
HTML Code:
<mycode> just where do you think you have the code you reference? |
1 Attachment(s)
Woops ! I'm so sorry. I'm working from the French site to build the bilingual site and I sent you the wrong CSS Insert. My bad - shame on me !
Attached is the correct one Regards J |
that contains the same code - those are the EXACT same file byte for byte - sure you didn't send the wrong one?
|
1 Attachment(s)
Something is seriously wrong here. I sent you the correct CSS Insert and, after checking it, I realize that the English code lines have been stripped. Attached is a screen shot in PDF format of the Add HTML/CSS Inserts page. As you can see, the format for each menu item is this one:
Quote:
All that remains of the original code is this: Quote:
What is going on ? |
Try disabling all your plugins to see if one is causing the issue. I just put that code in and it remains.
|
Hi again,
Thanks for your patience. I just desactivated all plugins - only qTranslate remains. Same problem. 2 thoughts: 1- Should I uninstall Atahualpa and reinstall ? 2- Did you look at the qTranslate FAQ I was referring to ? Clicking on the Title/Home-Link resets selected language. This is the 4th one on this page: http://www.qianqin.de/qtranslate/for...1cdb0&start=10 I'm not knowledgeable enough to check this unfortunately. Many thanks for your help. It is much appreciated. Regards J |
Try this, disable qtranslate and then add that code in and see if both versions remain.
I don't think re installing would help Yes I looked at that FAQ, but it is from 2008 |
Good morning,
I really appreciate your help. Thanks for your patience. It took us many tries due to my inexperience but we're getting there... The code has always remained in "Add HTML/CSS Inserts". It is only stripped from the Atahualpa settings file. I disabled qTranslate. The code remained in BOTH CSS Inserts and in the Atahualpa Settings file as shown here: Quote:
Another thought: with qTranslate enabled, the English part is stripped but I can still switch a page from one language to another using the qTranslate widget. Also, when selecting a menu item in either language, it outputs the proper page in the selected language. This should mean that the English menu code is there somewhere in the programs even if it is stripped from the settings file. Regards Jules |
send me a copy of the atahualpa settings WITH both languages in it.
If the the setting file only ends up with one language when doing the export while qtraslate is active, then it is causing the problem for teh export (and how knows what else). |
Ok, I just did a test and looked at some of thier code. It seems the issue is that the plugin has a hook in the get_option code (which is why they are saying the theme shoulldn't use it) and are changing things based on what language you have set for the defaule. IMHO this is wrong and there is nothing the theme can do to correct it.
You are going to have to take this up with the plugin author. |
1 Attachment(s)
Hi Juggledad,
In case you still want it, here is the Atahualpa setting file with both languages when qTranslate is inactive. I understand your answer even if it is not the one I was looking for. However, I have to find a solution because I have too much invested in Atahualpa. I love the theme, it works beautifully and support is outstanding (thanks!). Also, it works beautifully with the WP Photo Album Plus plugin - I will have about 2000 photos in it when finished so I guess you can understand I don't want to make a separate site for each language... I have posted the problem in the WP qTranslate support forum last Saturday and I still have no response but it is the weekend. Honestly, I'm a bit afraid of the reply I will get if I get one... They will most likely tell me that this is a template problem because it uses the get_option function instead of bloginfo. Since you have looked at the code, do you think it would be possible, without too much work, to change the code in either qTranslate or Atahualpa to make it work ? Regards Jules |
Can you tell me why you are putting the menu code in the CSS Inserts BODY and not just editing the pages and putting the french and english page titles in? If you do that, you can use eithor the Atahualpa menu's or create a wordpress custom menu and they seem to work fine
|
Interesting question ! I have decided to do this when I started working with WordPress and Atahualpa to gain complete control over the looks and format of the header. I wanted some features that I was unable to put in the page menus: thin line above and below the menus, repeat the menus in the footer, change a menu item to underlined bold when hovering.
I was unable to code these to work within Atahualpa so I switched to HTML in HTML Inserts: Body Top. If you look below that code in CSS Inserts, you will see a section called /*-- Menu -- */ that countains all the style and format tags. This code origins from "The Turning Gate", that makes web engines for Adobe Photoshop Lightroom - I have modified it to serve my purpose. With time I have gained some expertise in Atahualpa and programming, maybe I should try it again as you suggest. Do you really think it could work ? Regards Jules |
Quote:
Quote:
My quick test seems to indicate that it will work, you will have to try it in depth. |
Quote:
Quote:
My quick test seems to indicate that it will work, you will have to try it in depth. for a quick test, just add '%bar1 %pages %bar1' to the 'Configure Header area' option - you will need to stle the %bar1 but worry about that later |
OK, I'll try it. It may take some time and I will report to you when it is done.
Many thanks again for your SUPER help. It is much appreciated. Best regards Jules |
Well, it worked !!
Here is the page: http://julesgobeil.com/photo/accueil/?lang=en The logo image switches languages The top custom menu works fine However, I have been unable to insert a custom menu in the footer. When I create a widget area in the footer, the logo in the header stops switching according to language. I tried it twice with the same result. Here is what happens to the contents of "Style and edit Header Area / Show Logo Image ?" Contents before inserting a widget in the footer: Quote:
Quote:
Here is the code I am inserting in Style & Edit Footer / Footer Content to create the widget: Quote:
Regards Jules |
this is qtranslate messing things up again. do this, add the widget area THEN add the
HTML Code:
[:fr]logo_fr.png [:en]logo_en.png |
Well, I tried your suggestion and it does not seem to work at my end. This qTranslate seems to be quite tricky. I already spent too much time on that footer menu - I think I'll forget it for now.
I still have to implement all my plugins and see if they work with qTranslate. Thanks for your help. Much appreciated. Jules |
All times are GMT -6. The time now is 03:26 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.