Created
November 19, 2014 20:11
-
-
Save markoheijnen/9337dc054e1224f9ba5b to your computer and use it in GitHub Desktop.
qTranslate to Babble
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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