Hi,
I am developing a plugin for my website(WordPress version 3.8.2) that when adding or editing posts has the capability of translating the content of those posts using web-services. I found some plugins with that functionality but they are designed for using Google translate, which is now a paid service, so they are not what I am looking for.
Up to now, I added a button to the post editor that opens a pop-up in which I will have the translation capabilities, such as, choose source and target language etc. This is the code I used for the button.
function oi_itzultzaile_botoia_gehitu()
{
echo '<a href="'.get_bloginfo("wpurl").'/wp-content/plugins/ohar-itzultzailea/itzulpen-orria.php?TB_iframe=true"
class="thickbox" title="'.__("Ohar Itzultzailea","ohar-itzultzailea").'">
<img src="'.get_bloginfo("wpurl").'/wp-content/plugins/ohar-itzultzailea/irudiak/itzuli-botoia.png" ></img>
</a>';
}
add_action('media_buttons', 'oi_itzultzaile_botoia_gehitu');
The popup works fine. Now, I am trying to get the content in the post editor, so that I can use it as a parameter for the web-service. However, no luck so far. I have been looking into the documentation and browsed into the results given by google but I did not find something that would help me. Does anybody know how to do it?
Thanks for your help, :D
Manex