• Hello, I would like to know how can i can have 2 pages with the same name but different languages and different permalinks.

    I’d like to have this:

    http//mywebsite.com/en/contact > contact page in English
    http//mywebsite.com/fr/contact > contact page in French

    but it is actually doing this:

    http//mywebsite.com/en/contact
    http//mywebsite.com/fr/contact-2

    I certainly miss something in configuration but what ?

    Thanks for your help

    https://www.ads-software.com/plugins/polylang/

Viewing 15 replies - 16 through 30 (of 30 total)
  • Plugin Author Chouby

    (@chouby)

    Happy new year to you too!

    I would think it is a conflict with a canonical redirect.

    Polylang canonical redirect is in PLL_Frontend_Links::check_canonical_url(). You can override it with the ‘pll_check_canonical_url’ filter. And of course there is the ‘redirect_canonical’ filter for the core.

    Ulrich

    (@grapplerulrich)

    I was looking into more and found out the issue is that WP uses the slug to search for the page and finds two pages. Do you know if there is any way to make WP to take the language into account when searching the DB for the slug?

    Hi Guys. I have successfully done this. But i have done lot of stuff to do this. Please check this site https://justformen.com with wpml plugin. You can see same url “https://www.justformen.com/products/” same for all English countries but with different content. I have made some changes and made a trick to do this.
    Let’s see:
    For US product page i added slug as https://justformen.com/products_en
    For English CA product page i added slug as https://justformen.com/products_en-ca
    For French CA product page i added slug as https://justformen.com/products_fr-ca

    After that i used a filter to remove language parameter in all links in pages.
    So it make products_en to products and products_en-ca to products.

    After that i used wp rewrite rules to add language parameter in query var. Like if language is en-ca and query variable is product then concat both so make it products_en-ca. Now this page is we have so worpress will show this content.

    If you guys need help especially “mishle” then i can help you thorough out.

    Thanks ??

    Ulrich

    (@grapplerulrich)

    @hardeep360 Do you have a code example how you achieved that?

    It is a big minus for this plugin.

    I hoped to use it for my project, but unfortunately need to go back to WPML.

    Ulrich

    (@grapplerulrich)

    I have been able to get it to work fully. The only issue is with switching languages and that is fixed in Polylang 1.7

    https://github.com/grappler/polylang-slug

    Ulrich, nice to hear that! Willing to check it soon)

    Hey Ulrich,

    Thank you. I’m going to try it now.

    Hopefully, polylang could add this as a default setting…

    Hey Ulrich,

    Installed your plugin but it seems to be playing up for me, would appreciate help to get the bug resolved.

    https://teyinet.az/ru/about
    https://teyinet.az/az/about

    When I enter AZ version it transfers me back to RU version for some reason.

    Any help would be appreciated.

    Thx,
    Mehti

    Ulrich; just wanted to pop in and say thanks – it works a treat!

    Plz Help I am New in WordPress..
    The Question is How to create More Than one page in wordpress..
    Actually i am making a plugin so , i create two dropdown one is Upload an Images Second is Sel An item ..

    Thats for i must have to create two pages for these to dropdown items .
    plz tell me..
    thnx

    Ulrich, the plugin works great! Thanks.
    Would it be easy expand this to product categories? I’m trying to get this to work with WooCommerce installed and while the catalog and the individual products switch translation with no problem to the same slug, my pages of product by category won’t and require me to divide the categories up to unique slugs.

    Can anyone help?
    Hi there,

    I am new to wordpress and to polyland and to website all together….

    All was well until this…

    I would be so grateful for help and I hope that I managed to explain myself, not knowing the jargon…thank you.

    If I start with

    https://www.londontherapycentre.co.uk/language/fr/accueil/

    I get “not found” and the menu page is in English ( although the link is suppose to be French)

    I then click on the French flag and it brings me to the correct page

    https://www.londontherapycentre.co.uk/fr/accueil/

    now

    Click on the English flag and it brings me to the English home page

    https://www.londontherapycentre.co.uk/en/sample-page-2/

    And then again click on the French flag ….all good

    However if I start with

    https://www.londontherapycentre.co.uk

    I get the correct English page but if I click on the French flag I get

    https://www.londontherapycentre.co.uk/language/fr/

    which is a page that I cannot find anywhere in my wordpress, I can’t access it, can’t change anything about it.

    Doesn’t it make any sense to you?

    Please please help

    Thank you

    Setting are as below

    Default Language: English
    URL modifications: The language is set from the directory name in pretty permalinks ticked
    Hide URL language information for default language not ticked
    Keep /language/ in pretty permalinks tick

    All the rest is unticked

    https://www.ads-software.com/plugins/polylang/

    Plugin Support Chrystl

    (@chrystl)

    @barbara.pawson
    That’s not the same problem.
    Please don’t duplicate the support request. I will try to help you in your previous topic.

    Here’s the workaround that I use:

    1) Set the Polylang settings to “let the content determine the url”
    2) name the home page of your french version “fr”
    3) set the content page, let’s say “company” to be a child of “fr”

Viewing 15 replies - 16 through 30 (of 30 total)
  • The topic ‘Create 2 pages with same name but different languages and permalinks’ is closed to new replies.