Great work, thank you for sharing this!
If you need to get the IDs of translated pages / posts you can use the following functions:
function lang_post_id($id){
if(function_exists('icl_object_id')) {
return icl_object_id($id,'post',true);
} else {
return $id;
}
}
function lang_page_id($id){
if(function_exists('icl_object_id')) {
return icl_object_id($id,'page',true);
} else {
return $id;
}
}
You can use a development license to test WPML.
You can register the site as a development site with the following steps:
1) Log into your WPML.org account and go to the list of registered sites
2) Click the “Add new site” to create a new key
3) Add the site URL then in the second step set the site type as “Development site”
4) Copy the generated key then use it to register WPML in Plugins > Add New > Commercial tab.
Please check here for more details: https://wpml.org/faq/install-wpml/#register