Whadup brothers and sisters!
So I'm programming a multilingual website while using the Polylang plugin (normal free version). I am currently thinking about creating an admin menu page via PHP, on which I will program an automated method to automatically generate and save a particular post in, for example, six different languages. Just to be a lot faster than writing and saving them all separately. The idea is to create six different input fields on the PHP administration page, each of which represents the content of each contribution (in HTML structure). The content is then accessed with a simple push of a button, and the six articles are saved and linked with one another using their respective languages.
What I wanted to ask in this community; to make sure you can program this correctly:
According to what I've checked so far, the plugin (in phpMyAdmin) uses:
a) the table wp_term_taxonomy to match taxonomy and term IDs with the taxonomy & # 39; language & # 39; to link, where an array identifies the characteristics of a particular language as a value. As I understand it, shouldn't this step be necessary for the above automation?
b) the table wp_term_taxonomy to provide taxonomy and term IDs with the taxonomy & # 39; post_translation & # 39; to link, using an array of the IDs and languages of the assigned / translated posts as a value. For each translated ensemble of posts, I would therefore have to create a record in this structure and insert it into the wp_term_taxonomy table.
c) the wp_term_relationships for assigning taxonomy IDs to WordPress object IDs (such as the ID of a WordPress post) for assigning the respective translations. For each individual contribution of each translated ensemble of contributions, I would therefore have to create a data record in the corresponding structure and insert it into the wp_term_relationships table.
And before these two steps (b and c) I would of course first create a new post using the wp_insert_post method.
So two questions to make sure that I automate everything correctly and that no database material is missing if I do it like this:
1) Do you know of any other database tables that the Polylang plugin uses / on which its functionality is based?
2) What do you think of the idea of automating the generation of multilingual posts in this way? Perhaps you know something about the regularity of the structure of the databases that polylang uses? Just to avoid programming automation that won't work with the next Polylang update.