Quantcast
Channel: polylang – WordPress.org Forums
Viewing all articles
Browse latest Browse all 11471

jbx on "[Plugin: Polylang] Permalinks for translated pages"

$
0
0

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 all articles
Browse latest Browse all 11471


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>