Skip to content

Instantly share code, notes, and snippets.

@markoheijnen
Created November 19, 2014 20:11
Show Gist options
  • Save markoheijnen/9337dc054e1224f9ba5b to your computer and use it in GitHub Desktop.
Save markoheijnen/9337dc054e1224f9ba5b to your computer and use it in GitHub Desktop.
qTranslate to Babble
- Set default language and all languages to WordPress/Babble
- Loop over all posts and load the translations inside post_content to an array
- Loop the array and skip the default language.
- Babble_Jobs->create_post_jobs( (object) $curren_post, (array) $language_codes )
- You will get post ids back and need to call the next function.
- Babble_Post_Public->initialise_translation( $original_post, $lang_code )
- For the behaviour it's best to look at Babble_Jobs->save_job() which is called by the save_post hook
- when successful the default language content should become post_content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment