I'm currently developing a User Registration plugin, since I couldn't find any free that are properly translated I decided to create my own.
The Plugin is mainly completed... My PO and MO files are created for both language I want it to work for now.
The way I launch my Plugin, I use ShortCodes inside pages to launch my plugin.
Once the ShortCode is included in a page the user has to select that page inside my plugin configuration. The ID of the page is save in Options of WordPress and then I pull that information when someone click on REGISTER:
define("EASYREG_REDIRECT", home_url() . '?page_id=' . get_option('easyreg_redirect_page'));
My problem is when I use a Plugin like Polylang, each page has it's own "Language" value. How can I find the "Equivalent" page from Let's say English to French.
So let's say the user select the English Page: Registration (Page ID 4) how can I find the "french" equivalence Inscription (Page ID 6).
Is there a way to do it from within WordPress?