2

I am building a bilingual website using Craft CMS. The english entries are completed and I am now in the process of doing translating the content to french. I would like to know if there is a way clone the english entries to the french entries so I can just change fields that are different?

2

You could build a plugin that loops thru all the entries and creates a new entry programmatically, the only difference in the new entry would be the locale. Look at this: https://craftcms.com/classreference/services/EntriesService#saveEntry-detail, you would include $entry->locale = 'fr_us'; or whatever the shortname/handle of that locale is.

Or export the entries and import them, and setting the locale to french using something like: https://github.com/engram-design/FeedMe

  • FeedMe is the way to go with this! I just imported around 500+ entries in to a newly created locale. Worked a treat and saved doing it manually ;) – Jason Mayo Oct 13 '17 at 9:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.