Support » Plugin: Polylang » Permalinks for translated pages

  • I am trying to make a bi-lingual site, English (default) and Arabic, but I am struggling with the way permalinks are being generated. I have pages and a custom post type called product. Nothing too special about it, just a couple of extra custom fields (via Advanced Custom Fields plugin).

    For some reason, the permalinks of translated arabic posts are being generated with an Arabic URL (which I don’t want). I just want the same post URL just with the language appended as a URL parameter.

    For example:
    English: http://www.mydomain.com/page1
    Arabic: http://www.mydomain.com/page1?lang=ar

    Instead I am getting something like:
    http://www.mydomain.com/ar/الإنترنت

    And for my custom post type:
    http://www.mydomain.com/products/الإنترنت

    How do I make the language as a URL parameter? (The settings don’t seem to offer that option although I’ve seen people here using it).
    How do I avoid getting permalinks generated like this for translated pages? (I want to use pretty URLs for English).

    My settings:
    Wordpress Permalink Setting: Post name
    Using a static front page.

    Polylang settings:

    Default: English
    The language is set from the directory name in pretty permalinks.
    (I don’t actually want this, I want pretty permalinks for English and URL parameters to switch the language to non-default).

    Hide URL language information for default language.
    Remove /language/ in pretty permalinks.
    Set the language according to the browser preference.
    Activate languages and translations for media.
    Custom post types: Products
    Synchronisation: Taxonomies, Custom Fields, Featured Image, Page Parent.

    https://wordpress.org/plugins/polylang/

Viewing 1 replies (of 1 total)
  • Plugin Author Chouby

    (@chouby)

    Hi!

    The arabic slug is generated by WP based on the page title. You can change it as you want but you can’t use the same slug for 2 pages even if they are in different languages.

Viewing 1 replies (of 1 total)
  • The topic ‘Permalinks for translated pages’ is closed to new replies.