1

I am a newbie to WP plugin development. I am trying to develop a wordpress plugin that would that translate text from English to some X language. I have the required API for translation. I want to extract only the post content from website, send it to the API and get the translated text. Here the translated text should be replaced by the original post content on the website. I am not sure how to fetch the post contents and send it to API and replace the translated content with original as in Google language translator plugin.

Any help would be greatly appreciated. Thanks.

0

Why reinvent the wheel when you have https://weglot.com/ which is awesome and does exactly what you need. (that is non paid and not an affiliate link ;) )

  • Yes, I have explored it about weglot and that is exactly what I want to build like. But, I have my own translation engine which I would like to integrate to a plugin. Since, I am newbie, I was not sure as to how I can create a plugin like weglot for my own translation engine. – Sravan Feb 21 '17 at 5:54
  • Assuming you are only wanting the content within the_content ...then reference this: codex.wordpress.org/Plugin_API/Filter_Reference/the_content – mogmachine Feb 22 '17 at 6:50

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.