Whadup brothers and sisters!
So I'm programming a multilingual website, whereas I'm using the polylang plugin (normal free version). I'm currently thinking of creating an admin menu page via php in which I program an automated way to generate and store a given post automatically in let's say six different languages. Just to be much faster then by writing and storing them all separately. The idea consists in creating six different input fields on the php admin page, each standing for the content of each post (in HTML structure). Then, on a simple button hit, the content is accessed and the six posts stored, and interlinked via their respective language.
What I wanted to ask in this community; to be sure to be able to program this properly :
From what I've checked so far, the plugin uses (in phpMyAdmin):
a) the wp_term_taxonomy table to associate taxonomy and term ids with the 'language' taxonomy, with an array characterizing the features of a specific language as value. So, from my understanding, for the automation above, it shouldn't be necessary to consider this step?
b) the wp_term_taxonomy table to associate taxonomy and term ids with the 'post_translation' taxonomy, with an array of the id's and languages of associated / translated posts as value. For each translated ensemble of posts, I would thus need to create one record in this structure, and insert it into the wp_term_taxonomy table.
c) the wp_term_relationships to associate taxonomy ids with wordpress object id's (as for example a wordpress posts' ID) to associate the respective translations. For every single post of each translated ensemble of posts, I would thus need to create one record in the corresponding structure, and insert it into the wp_term_relationships table.
And before these two steps (b and c), I would obviously first create a new post with the wp_insert_post method.
So, two questions, to make sure that I will automate everything correctly, and that no database stuff will be missing if I do it this way:
1) Do you know about any other database tables which the polylang plugin uses / on which its functionality relies ?
2) What do you think about the idea of automating the generation of multilingual posts in this way? Do you may know anything about the regularity of the structure of the databases polylang makes use of? Just to avoid that I program an automation which won't work anymore with the next polylang update.