[Plugin : Polylang] -How to set language information used by polylang ?
-
Hi,
I am working on a wordpress instance which is feeded by XML-RPC. In this way, I can synchronize selected content between the two WordPress instances.This instance which is feeded by XML-RPC uses the Polylang plugin to manage 2 languages (English and French).
My question is :
How can I set using a script the language of a content which is imported by XML-RPC.This is what I tried :
I look at the rows of the tables : wp3_posts,wp3_postmeta and tried to write a script to build the language information for a given post.
I know Polylang can set a default language to content by I am not able to do it myself !For instance, the post with ID 23 has his language set to French (set in backoffice) whereas I don’t succeed in setting the information language of the post ID #30 using my script.
SELECT wp3_posts.*,wp3_postmeta.* FROM wp3_posts,wp3_postmeta where wp3_posts.id in (23,30) and wp3_postmeta.post_id = wp3_posts.id
23 1 2012-09-05 10:19:48 2012-09-05 08:19:48 contenu article a synchroniser publish open open article-a-synchroniser-3 2012-09-05 10:21:36 2012-09-05 08:21:36 0 https://my_domainblog/2012/09/05/article-a-synchroniser-3/ 0 post 0 62 23 _edit_lock 1346833298:1 23 1 2012-09-05 10:19:48 2012-09-05 08:19:48 contenu article a synchroniser publish open open article-a-synchroniser-3 2012-09-05 10:21:36 2012-09-05 08:21:36 0 https://my_domainblog/2012/09/05/article-a-synchroniser-3/ 0 post 0 63 23 _edit_last 1 23 1 2012-09-05 10:19:48 2012-09-05 08:19:48 contenu article a synchroniser publish open open article-a-synchroniser-3 2012-09-05 10:21:36 2012-09-05 08:21:36 0 https://my_domainblog/2012/09/05/article-a-synchroniser-3/ 0 post 0 65 23 _translations s:33:"a:2:{s:2:"fr";i:23;s:2:"en";i:0;}"; 30 1 2012-09-05 11:17:14 2012-09-05 09:17:14 contenu article a synchroniser publish open open article-a-synchroniser-10 2012-09-05 11:17:14 2012-09-05 09:17:14 0 https://my_domainblog/2012/09/05/article-a-synchroniser-10/ 0 post 0 94 30 _translations s:33:"a:2:{s:2:"fr";i:30;s:2:"en";i:0;}"; 30 1 2012-09-05 11:17:14 2012-09-05 09:17:14 contenu article a synchroniser publish open open article-a-synchroniser-10 2012-09-05 11:17:14 2012-09-05 09:17:14 0 https://my_domainblog/2012/09/05/article-a-synchroniser-10/ 0 post 0 95 30 _edit_last 1 30 1 2012-09-05 11:17:14 2012-09-05 09:17:14 contenu article a synchroniser publish open open article-a-synchroniser-10 2012-09-05 11:17:14 2012-09-05 09:17:14 0 https://my_domainblog/2012/09/05/article-a-synchroniser-10/ 0 post 0 96 30 _edit_lock 1346836782:1
I think that polylang must set extra informations in other tables but I don’t know which ones and how !
Does anybody can help me ?
Greetings,
Ben
- The topic ‘[Plugin : Polylang] -How to set language information used by polylang ?’ is closed to new replies.