Guy Verville Posted July 8, 2017 Share Posted July 8, 2017 I have create a module base on Cramer's Import Pages From CSV in order to be able to import bilingual data. I based my code with the help of this page. While the title, the body (page_content) field are saved, I cannot save the french path (this is an import of previous blog entries from another CMS. I must keep the URL. The english URL is saved). $p->of(false); if($columns['Titre'] != "") { $french = $this->languages->get("francais"); $p->of(false); // $p->title->setLanguageValue($french, $columns['Titre']); $p->page_content->setLanguageValue($french, $columns['Corps']); $p->name->setLanguageValue($french, $columns['Chemin']); $p->status->setLanguageValue($french, 1); } I get this error Link to comment Share on other sites More sharing options...
Guy Verville Posted July 8, 2017 Author Share Posted July 8, 2017 (edited) Ok, got it. $french = $this->languages->get("francais"); $page->of(false); // page->setLanguageValue($french, 'title', $columns['Titre']); $page->setName($columns['Chemin'], $french); $page->set("status$french", 1); Edited July 8, 2017 by Guy Verville 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now