• Hello

    I am trying to install English language in my French website using polylang.

    I found in your documentation “Multilingual Website“.

    So I added the code you describe in?functions.php?(in my theme) with the my ID pages.

    The problem if, if I am on the English part of my website, when I go on the listing page, I go to the French listing page. And then if I chose again English, I am on the English listing page, when I want to book and pay, I go again on the French booking page and not on the English one ! Have you got an idea why ? I checked the code and the ID pages, everything is correct !

    Thank’s for your help.

    Regards.

    Pascal

    The page I need help with: [log in to see the link]

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

    (@benitolopez)

    Hello,

    Honestly, I don’t know, because this doesn’t happen with WPML. I think that Polylang doesn’t translate the IDs correctly (or automatically). So this is something you need to try to fix yourself. I don’t have any suggestions.

    The only multilingual plugin supported at the moment is WPML.

    Best,
    Benito

    Thread Starter pascal83

    (@pascal83)

    Do you confirm I just have to add the code you describe at the end of the functions.php?of my theme ?

    I translated already all my pages into English and I am afraid if I have to do it again with another plugin !

    Is wpml free as polylang ?

    regards.

    Thread Starter pascal83

    (@pascal83)

    I just try to take off the code you tell us to add at the end of the?functions.php?of the current theme. It happen exactly the same problem. So I think the code is not working and I am wondering if I put it correctly ?

    Maybe it could help you to help me !

    Kind regards.

    Pascal

    Plugin Author benitolopez

    (@benitolopez)

    Hi,

    Actually, that code in the documentation is obsolete. Because since WP Hotelier 2.8.0, the plugin is able to know if a page is the listing or the booking one by checking the existence of the shortcodes.

    So again, this is happening because of Polylang. When you go from the listing to the booking page, WP Hotelier internally redirect you to the booking page using its ID. This ID should be automatically translated by Polylang when you are in another language.

    Check the Polylang settings or contact its author explaining the problem.

    Best,
    Benito

    Thread Starter pascal83

    (@pascal83)

    I asked them, will see…

    The strange think is that I discover that it switch to the default language just between your 2 pages ! The first page for room available is working good in, but it switch to French when we go to your second page Booking. Or when we are on booking, if we remove the room, when go back to your first page and then it switch again in French !

    The problem is just from one of your pages to the other one !

    regards.

    Pascal

    Plugin Author benitolopez

    (@benitolopez)

    As I said above, to know where it needs to redirect, WP Hotelier uses the page ID of the default Listing and Booking page, which are in French, with IDs 89 and 90.

    But usually, with WPML at least, a multilingual plugin translates that ID automatically to the corresponding translated page ID.

    So WPML, when it sees the ID 90 on an English page, it translates it automatically to 793 (the ID of the booking page in English).

    So this is not something related to WP Hotelier, but to Polylang.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Multilingual site’ is closed to new replies.