inpsyde / wpml2mlp

Convert posts from an existing WPML multilingual site via WXR Export/Import for MultilingualPress
https://wordpress.org/plugins/wpml-to-multilingualpress/
GNU General Public License v2.0
10 stars 6 forks source link

Implement wxr importer #22

Open derpixler opened 8 years ago

derpixler commented 8 years ago

We have to implement a custom wxr importer for the created wxr export files from single wmpl installation. We could not use the WordPress Importer-Plugin, there is no Hook to parse custom wxr elements.

If wpml2mlp in a Multisite aktiv also there have to exisxts under (Tools/import)[wp-admin/import.php]a section for the wpml2mlp wxr parser.

wpml2mlp_import_modul

At the 0.0.1.2 version of wpml2mlp we have turned the xliff export format to the WordPress defauld wxr. On every Post there have Translations that are appended at the post item.

    <wp:translation lang="en" post_id="2401"/>
    <wp:translation lang="de" post_id="2491"/>
    <wp:translation lang="nl" post_id="2071"/>
    <wp:translation lang="es" post_id="2566"/>
    <wp:translation lang="fr" post_id="2593"/>

Our wxr parser have to map the Translations to mlp.


Subtasks:

bueltge commented 8 years ago

https://github.com/humanmade/WordPress-Importer

Helpful, I hope it.

dnaber-de commented 8 years ago

@bueltge The hint about XML pull parsers in McCue's post is a good one.

@derpixler: We could go with a combination of XMLReader and SimpleXML: http://stackoverflow.com/a/1835324/2169046