Support » Plugin: qTranslate X » Link to Default Language Post Not Working

  • Resolved jjbte

    (@jjbte)


    I am currently testing qTranslate-X with two languages: English (default) and German. When I create a post in English only, and then switch to German, the link to the English version of the post does not work (it just reloads the same German page). Of course, one way to solve the problem is to uncheck the “Hide URL language information for default language” box in the “URL Modification Mode” section. I am using Pre-Path mode.

    I have chosen to NOT hide content not available in the chosen language, but I also checked “Show displayed language prefix when content is not available for the selected language.”

    It’s not a huge deal, but I’d rather not have the language prefix in my URLs when the default language is active. I thought checking the “Show displayed language prefix when content is not available for the selected language” would add the language prefix to the URL in these special situations, but I’ve either misunderstood its meaning or it’s not working properly.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author John Clause

    (@johnclause)

    I am sorry, I cannot understand where the problem is. Please, list step-by-step instructions to reproduce the problem.

    "Show displayed language prefix when content is not available for the selected language"

    Yes, this puts prefix on page text to let the user know which language is available and you can hide it.

    Do you wish to switch URL to other available language? This seems like a good idea to me, but it is not implemented at the moment. So, it would be another option … may be not so soon.

    Thanks a lot.

    Thread Starter jjbte

    (@jjbte)

    I’m probably not explaining the issue well enough. First off, thank you for your response and for taking on this plugin. I’m fairly new to WordPress and don’t usually have a need for multilingual sites, but I have one client who does. From what I’ve read in searching for a good translation plugin, you have saved many users who depended on the now abandoned qtranslate. So far, qtranslate-X is working quite well for me with just a few minor issues.

    As for the issue I’ve pointed to in this thread, here are the steps to reproduce the problem:

    1. Choose English as default language and enable one other language (German in my case).

    2. Choose Pre-Path mode and check box to “Hide URL language information for default language.”

    3. Do NOT choose to hide content not available in chosen language.

    4. Check box to “Show displayed language prefix when content is not available for the selected language.”

    5. Make sure German version of WP’s “Hello World” post is empty.

    6. In front end, choose German and view Hello World post.

    A message appears telling the user that the content is only available in English, and the word English is a link to the English version of the post. However, clicking on that link just reloads the same page rather than taking the user to the English version of the post. If I uncheck the “Hide URL language information for default language” box (step 2), the English link works properly, but I would prefer to not have the language prefix in all my default-language URLs site-wide.

    I guess at this point I’m mostly wondering if I have misunderstood the meaning of the option labeled “Show displayed language prefix when content is not available for the selected language.” I thought this meant that the “en” would be added to the URL in situations like the one described above, regardless of what I’ve chosen in step 2. Based on that thinking, I thought the behavior I experienced was due to a bug.

    First of all I’d really like to thank you for the work you’re putting into qTranslate X. I thought that I was pretty much screwed when I read that the old qTranslate ist not being supported any more, changing to another Plugin would haven been a major struggle for me.

    I have the same bug as jjbte describes here.

    If you choose that empty entries are being hidden, there is a message to display it in the language where content is available.

    For example, I have English (standard) and German enabled but most of my blogposts are only in English. If I look at a blogpost, while on the German “site”, that has only content in English the following message is being displayed “Leider ist der Eintrag nur auf English verfügbar.” (Unfortunately this entry is only available in English) – if you click on “English” it should relay to the entry in English but unfortunately this is not working.

    Hopefully you know what our problem is now. Thanks again for your awesome work, keep it up.

    Plugin Author John Clause

    (@johnclause)

    Hi @jjbte and @pascuin: thanks a lot for the perfect description of the problem. GitHub trunk now has a versoion with many fixes, hopefully including a fix for the problem you described: https://github.com/qTranslate-Team/qtranslate-x. You can download zip file from GitHub.

    I would really appreciate if you could test it before I release it to the public. THat new version has many changes. If you do testing, please test not only your problem, but the whole thing as much as you can. Thanks a lot – much appreciated.

    Thread Starter jjbte

    (@jjbte)

    I have uploaded the package to my WordPress site and it is indeed showing version 2.9.7.1b. It just so happens I am working with a test site, so it’s not a huge issue for me to install a “test” plugin. I don’t know how much time I’ll have to thoroughly test, but I’ll do what I can and try to report back here as soon as possible.

    Thanks again for working so hard on this plugin. 🙂

    Thread Starter jjbte

    (@jjbte)

    At first glance, the new version appears to be working properly regarding this issue. I have three languages now: English (default), German, and Portuguese. Because I only recently added Portuguese, I have several pages and posts not available in that language. I have opted to NOT hide content unavailable in the chosen language, and I have also opted to NOT show the default language parameter (“en” in this case) in default-language URLs.

    This latest version seems to behave just as I wish for both posts and pages. I select Portuguese and go to a page or post that is not available in Portuguese. The message tells me the content is available in German and English. As is necessary, the English link DOES contain the language parameter and properly takes me to the English version of the page/post. In addition, the actual URL in the address bar does NOT show the English language parameter, which is what I would expect since I chose not to have the default parameter in my URLs.

    In conclusion, this latest version appears to have resolved this particular issue, at least from what I have observed on my site.

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Link to Default Language Post Not Working’ is closed to new replies.