Reputation: 27
Good day. I'm having a csv file with the structure like this:
ID ArticleID Title Content LanguageID LanguageCode Createdby DateCreated DateModified
Since a post is translated into 2 languages, articleID will be repeated for 2 rows with title and content in different language : e.g
ID ArticleID Title Content LanguageID LanguageCode Createdby DateCreated DateModified
1 2 Adobe Patches Adobe System... 0
2 2 patchs adobe système adobe... 1
How can I import each record for two languages? If I choose the key value for the plugin to be the articleID, it overrides all the content.
Upvotes: 0
Views: 297
Reputation: 76
Are you using a plugin to handle the translations, such as qTranslate?
If not, personally this is how I would do it (assuming these are WordPress Posts you're adding):
Create a meta box in your Posts section with the same main fields, but for the different language. If you're unfamiliar with how to do this, Advanced Custom Fields will probably be the plugin you would need, since WP ALL Import works great with ACF. Toolset is also easy to use if you don't like ACF.
Modify/Create a new import, and set it to modify ONLY the new Meta box fields for the second language.
That way you'll have all the post data in one place, and the import will work simply. For reference, you can either have two imports, one for each language, or set WP All Import to handle the filtering (which is more advanced).
Hope that makes sense to you.
Upvotes: 1