sinanisler logo

WPML AI Translation with OpenAI GPT4 AI, WordPress

Working on something pretty nice.

When you use WPML you can translate your content manually or automatically. But when you want to do auto you have to pay to the WPML for translation credits. Because they are using Azure and Google APIs they have to pay for those APIs.

But the problem is they ASK too much and they are very GREEDY with it. Before defending anyone I suggest anyone to check the Google API cost and WPML Credit costs. 1 4

That’s why I decided to make my workflow better, faster, and cheaper.2

Right now I am developing this OpenAI Translation in WPML extension. MVP is almost ready.

This will add a Translate with AI button to the WPML translation page and you will just have to click it per translation. Why not a one-click full-page translation? Maybe later not now. For now, I want to prove the content and make it work first. Later instead of one line, I could translate all the lines with one button too. “If I can see I can translate it” I am pretty sure 🙂

To use this tool you will need to use the OpenAI API key and it will be possible to translate all websites with just 1$ or less. For just 10-15 page small sites it won’t even cost 50 cents probably 🙂

I plan to use GPT4 only. It is a bit expensive compared to GPT3,5 but it writes multi-language very well and is more cohesive. People are using GPT4 to write books right now and after the latest OpenAI announcements default GPT4 model become much much cheaper.3

Only worry I have is GPT4 API very slow sometimes I am hoping Microsoft-OpenAI will buy more GPU and solve this problem soon.

Maybe to keep the tool fast I could start with GPT3,5 just for speed. We will still be testing the tool for myself and in our agency.

We will see. ✌

UPDATE 29.11.23

Beta ready. I am already started using the tool 🙂

Updated made default model GPT-4o;

Here is the Beta Version. Download the .zip and install it as chrome extension. Intall it from the Chrome Extension settings as unpacked extension.

Install the extension enter your OpenAI key and start using it have fun. System prompt not perfected yet make changes if you need it.

Download FREE WPML AI 😎

12 comments

  • Very nice plugin. It’s fantasic
    Do you know how you can customize the context of the translation?
    What I mean, if I translate something from Dutch to English I get “Requesting a Divorce” but the more juridical translation is “Filing a Divorce”.

    How could specify such a context?

    • A
      Sinan Isler

      the system prompt is “Translate the following text. Keep the syntax or html tags as same if there is any with the translation. if the sentence already translated or too short dont say too short just translate only. dont add anything else and dont give any suggestions ever never”

      you can try to refine the system prompt 🙂

      system prompt is in the content.js file.
      maybe you can try making the system prompt completely in dutch or add exceptions? there is so many ways to solve it. it is grammer after all

  • I find out the reason… sometimes there is a unjoin button of wpml. For everyone who faces the same, just clicks unjoin.

    • A
      Sinan Isler

      yes. when it comes to WPML always keep everything native I never use that linking thing 🙂

  • Is it only my problem with this error? Access to fetch at ‘https://api.openai.com/v1/chat/completions’ from origin ‘https://e.ate.wpml.org’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: It does not have HTTP ok status.

    🙁

  • End of the world, looks like wpml block it.. when i click the button it no longer works…

    GG!

    • A
      Sinan Isler

      no still works just tested.
      – if buttons doesnt show up jstu refresh the page it will show.
      – dont use the new design click right top gear setting change it back to classic editor.
      – and save your openai key again maybe your localstorage cleared somehow. this extension uses the browser localstorage to save the api key.
      – use google chrome

  • Are you still developing the plugin? I am very interested

    • A
      Sinan Isler

      it still works updated to gpt-4o read the end of the post download it

      • Hello, you are a genius. It is working so well for single translation.

        But for bulk translation, it is not working well. Sometimes the 2nd translation is the same as the 1st one.

        WPML translation is so expensive for the charge with low-quality translation.

        • A
          Sinan Isler

          interesting I didnt have that problem with bulk generation.
          try to refresh the page before making bulk generation. There is way too much frontend rendering this is the side effect of this.

          I agree they recently added AI but added on a STUPIDLY expensive margins. That is why we hav ethis extension 😎

  • Christian Orr

    Hey there! I just wanted to drop by and say that your work is absolutely amazing! I’m really impressed and would love to give it a try myself. Keep up the great work, you’re doing fantastic!

Leave your comment