• Hi,

    I will to migrate a website to wordpress. I have 5000+ articles (english / french) and I want to import these articles automatically through phpmyadmin (mass import) from a SQL file or a CSV file (don’t know yet).
    So I study how datas are inserted in WP database and I have a question about Polylang and the entries created in the WP_terms table. For example, when I add a category it insert the category name but also another term_id with pll_asf5vdg67 string in name and slug field. When I delete this category the record with pll_asf5vdg67 remains and another one is created.
    I understood that this entry is linked to another table and that it makes the link between the two translated categories term_id but if I want to create directly in the database a category I don’t know how the pll_xxxxxx string is built. I have a lot of categories and tags

    Could you help me ? And if you have some other tips to help me in mass import, I will be great !

    Little stone (all apologies for my frenchy english 😉

    https://wordpress.org/plugins/polylang/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Chouby

    (@chouby)

    Hi!

    Two taxonomies are associated to categories: “term_language” and “term_translations”. The first is used to associate the language to the category. The second allows to group translations. pll_asf5vdg67 is just a unique id for such translation group. The value doesn’t matter. It just has to be unique. Also it’s important that the term description contains a serialized array of term_ids of linked translations. So each category should have 2 entries in wp_term_relationships, one for for the language, one for the translation group (even if the category is not translated).

    More info on WP database: http://codex.wordpress.org/Database_Description
    Reading the code of WPML to Polylang may help you too.

    Thread Starter little stone

    (@little-stone)

    Woah! Quick answer ! Thank you a lot.
    I didn’t think about the migration from WPML but it’s obvious ! I will study this.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Polylang – Automatic term / posts creation’ is closed to new replies.