Plugin Author
Chouby
(@chouby)
@chouby , not really , I am aware of the plugin api
But What I want is to find out if the post is a translation or if it is original post.
Do you think checking the current post lang enough like that:
pll_get_post_language($porductID) != pll_default_language()
Or might be cases where this is not enough
Thanks for replay
Plugin Author
Chouby
(@chouby)
There is no way to achieve what you want because there is no “original” post in Polylang. There is no difference between the original post and its translations. They are stored the same way. Moreover, the original post is not necessary in the default language.
@chouby I see , I will take a deeper look then about my problem , thanks for replay again
Great plugin! but the info about be or not the ‘original’ post is necessary also for me, and I believe for many others.
In my case is about retrieving the original campaign id in a crowdfunding multilanguage site (coopfunding.net), something needed for accounting and campaign payments relationships, listing, etc.
We can not rely on default lang, because some posts (campaigns) are started in other languages and we need to know which is the original post language (or a way to discover that).
Is the only thing pending to solve, in order to stop using wpml…
As a first sight, with just a postmeta boolean record (ex. ‘original’ = 1) only for the original posts its enough for us. Any post without that field (meta?) will be a translation. Still not storing info of its original in the translated posts (as wpml), but at least we can see if its the original or not, and make a loop to discover it.
This new option makes sense to be included in the ‘wpml to polylang’ plugin but also in the polylang itself, recording this flag for the new original posts. If the code where in github perhaps i can try to help… anyway it seems easy to add this and perhaps you can consider to include the feature in the next version?
Thanks again for your opensource contribution!