link to home loses language

dev.xiligroup est en travaux Forums xili-language plugin link to home loses language

Ce sujet contient 0 réponses et 4 voix, et a été mis à jour par  xiligroup dev il y a Il y a 12 ans, 9 mois.

Visualisation du message 10 (1 sur 10, 10 au total)
  • Auteur
    Articles
  • #3049

    xiligroup dev
    Keymaster

    Please enclose your example link in code markup to be readable et precise your question and circumstances

    #3050

    Anonyme

    //EDIT i removed the code block, but you can see how the link works

    Yes of course:

    I’m using this PHP function in a link: bloginfo(‘home’)

    so the link looks like this: a href= »bloginfo(‘home’) »

    It works fine, you get redirected to the homepage, but the problem is that i lose the current language. Also other plugins besides my own link use the wp home url (breadcrumbs).

    For example: My default language is Dutch, i select English and go to a page. When is click on the link with bloginfo(‘home’) the homepage is Dutch again, so you lose the current language.

    Is this normal behaviour? And do you have any suggestions. Do I have to write a hook on the bloginfo(‘home’) function to add the langauge query after it?

    #3051

    xiligroup dev
    Keymaster

    Is your homepage a list of recent posts or a page set in wp-settings ?

    #3052

    Anonyme

    No it is a static page, forgot to mention that. So it get redirected to the static page, and then it will take that language. That is what goes wrong i think.

    #3053

    xiligroup dev
    Keymaster

    if home is a static page (as dev.xiligroup.com). Each language must have his static page linked to the others. According home rulers (your own or those set in settings – browser) wp+xl give the results. And so the items in themes are displayed according the page language.

    #3054

    Anonyme

    I’m seeing the same thing here (http://kokopelli-pachamama.com). Try changing from the Homepage to Castellano and click on the Home link. You’re back to the french homepage. The links are correctly set up in the admin zone.

    Any pointers on why it ought to work for you and not us ? ;-)

    #3055

    Anonyme

    Hello, I visit your site and see some little pb in way how XL is installed and how languages are created – curiously the slug of languages are not good :

    http://www.kokopelli-pachamama.com/?lang=en_us-tidy-languages-group ??? and not ?lang=en_us

    Please use the contact form in plugin settings after checking infos… you will receive a direct reply !

    #3056

    Anonyme

    Thanks ! That was it ;-).

    #3063

    Anonyme

    I’m waiting on an answer from the contact form for more than 2 weeks, so sorry for using this forum again, but… The issue came back after upgrading, clicking the Home link reverts to the default language.

    For example, on the URL above, if you click a language (you end up on the correct Home for that lang), then back on the Home link (whose URL don’t have a lang param), you’ll revert to the Home default lang (since the current lang is not passed in the URL).

    BUT if you click a lang, change to another page (not Home), then on that page, the Home link has the page_id of the correct localized Home page.

    (BTW, I also checked against dev.xiligroup.com, just to make sure, and the same thing happens here, except the lang param is appended on the other links, but not on the Home one).

    I’ve tried changing the lang codes, checked the links on the Home page thrice, now I’m not sure how to fix that. I’ve also made a few tests using cURL, and it seems the HTTP Accept-Language header is ignored. Is this a known issue ? An unsupported thing ?

    Current xili-plugin is v2.4.1, WP is 3.3.1.

    #3064

    xiligroup dev
    Keymaster

    An email was sent now to your account.

Visualisation du message 10 (1 sur 10, 10 au total)

Vous devez être connecté pour répondre à ce sujet.