Hi,
Yes, that was indeed my question. The English to Hungarian model is unfortunately one of the worst performers of all available models.
Thank you for the suggestion. I will look into them both!
Hi,
Any chance of a Custom API option being added later?
Besides the Gemini API and Azure Translator AI API I mentioned, I also found some APIs on https://rapidapi.com/search/Translation?sortBy=ByRelevance, like Lingvanex Translate or Just Translated, which offer free monthly limits, similar to DeepL. These could also serve as alternatives when the DeepL limit is hit.
Hi mate,
Yes, a Custom API option is being worked on and may be released as early as tomorrow :)
Thank you for the suggestions. I've looked around at different APIs and most do offer a free limit, but most seem to not offer a default rate limit. Instead the user has to set the limit themselves, which in some cases isn't straightforward for non-tech-savvy people. I'm not too keen on implementing APIs as such due to risk of having users blow way past their limit and blaming it on GameTranslate. Of course there are many things I could do to prevent this from happening, but it would need some careful consideration and be thoroughly tested.
Hi,
I've tried it, and here's what happened:
This is the code:
curl "<a href="<a href="https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent">https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent</a>"><a href="https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent</a>">https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent</a></a>" \ -H "x-goog-api-key: $GEMINI_API_KEY" \ -H 'Content-Type: application/json' \ -X POST \ -d '{ "contents": [ { "parts": [ { "text": "Explain how AI works in a few words" } ] } ] }'
If I just messed up and it should actually work, that's fine. But if not, maybe it'd be great if you only had to provide the key and there was a dedicated field for the prompt.
I also tested with Microsoft Azure AI, but I couldn't get this one to work either. I looked into it here: Use Azure AI Translator APIs and here: Quickstart: Azure AI Translator REST APIs. Again, something is wrong with the Body section. It showed this error: "Error: Request failed: 400 Bad Request - {"error":{"code":400074,"message":"The body of the request is not valid JSON."}}"
Perhaps I made a mistake and messed things up, which is why they didn't function. I'm not sure, but that's what I experienced, and I should add I'm not an expert in this area. :)
Nonetheless, thanks for all your hard work. :)
Good day,
I just had time to test Gemini and Azure myself with this, and I can confirm it indeed does not work. The reason is that I built the JSON template completely one-dimensional like an idiot, lol. It's been a while since I did anything API related and just did not think of the fact that some API's will want a different format. I might be able to release a 0.5.0 beta version tonight to fix this if I have the time.
I tried https://rapidapi.com/gatzuma/api/deep-translate1 and got it working in both the main app and in-game tool. I'll try a few more to see if there is anything else I've missed. Do you remember which API it was that you had a problem with 'input_text'?
Here's how I set it up for the 'Deep Translate' API on RapidAPI.
Yep, you were using English to Hungarian right? Unfortunately, it seems most of those models are not better than that. It is usually due to a lack of data. Which translators have you used that translate well enough from EN-HU?
Many many thanks for your testing, you have my gratitude!
Hello,
Thanks for looking into all this; it definitely makes more sense now. I'll be looking forward to the 0.5.0 beta whenever it's ready – no need to rush! :)
The text_input issue was with TranslateAI. The error was: "Request failed: 422 Unprocessable Entity - {"detail":[{"type":"modelattributestype","loc":["body"],"msg":"Input should be a valid dictionary or object to extract fields from","input":"{"inputtext":"which APl it was that you had a problem with 'Inputtext'?","originlanguage":"en","targetlanguage":"hu"}"}]}"
Today, I tried a couple more with the underscore requirement, like OpenL Translate, but got this error: "Failed to parse JSON: Expected value at line 1 column 1 Response: Internal Server Error." The translation showed up in the program, but not when running in desktop mode. But since its quota is quite low, it doesn't bother me. It was good for testing.
Text Translator2 was similar. For some reason, it didn't recognize target_language even within the program, despite being provided. Error: "Error: Request failed: 400 Bad Request - { "status": "error", "message": "target_language parameter is required" }"
There were also APIs without the underscore requirement in the Body that showed translations in the program but failed at runtime, e.g., Lingvanex Translate. Error: "Request failed: 400 Bad Request - {"err":"Bad data.","result":""}"
I also tried this: Deep Translate, and it's interesting because it didn't work for me yesterday. However, when I re-tested it earlier today, it did work! Thanks for showing me the process, though. I did exactly the same thing yesterday, but it still didn't work then. Maybe I copied incorrect data, or there was an issue with the API itself; I'm not sure, but it's working now. I hope it stays that way! :)
Perhaps some APIs aren't working because they're unavailable, or I'm copying incorrect data, or they simply require a different format like Gemini.
Good news: I also managed to get the Cloud Translation API to work!
"It is usually due to a lack of data." - I figured you'd say that, lol.
Regarding good EN-HU translators:
Well, I haven't really used offline ones much. But I did get to try the 14-day trial for Ashampoo LocaLingo recently, and it actually gave pretty decent translations. Can't really think of or remember any other offline ones right now.
Online: DeepL, QuillBot, and various AI models offered good quality. Azure AI Translator also seemed quite good.
During my RapidAPI tests, the good or acceptable ones were:
Thank you for your patience! :)
I've fixed the issue with TranslateAI, OpenL Translate, Lingvanex Translate and Gemini. I have a few more things I need to sort out, but hopefully the beta will drop tonight.
Thank you for all the debugging, it has been very helpful!
Text Translator2 seems broken. I can't even get it working with Postman. Besides it doesn't expect JSON but rather
"application/x-www-form-urlencoded"
and I am not entirely sure what it is, but even doing a POST with that format on Postman returned the same error message.
If you'd like to use Gemini or a similar LLM that is not purposed for translation, you could prompt it simply as;
```
{
"contents": [
{
"parts": [
{
"text": "Translate this text to Swedish and only return the translated text: %text%"
}
]
}
]
}
```
The above format is not possible in 0.4.9 but will be in the beta release.
I tried it a little bit and it did not seem to break at all like the local LLM models I tried.
I'm curious to how you got Cloud Translation API to work. Definitely not straightforward with that one..
Thank you for the info. I would for sure be interested in adding Azure if they have an automatic limit or if it is easy for general person to set up. Problem is that they refuse to confirm my identity. Tried all my debit cards and it just won't work, so I can't even test it..
Hi,
Thanks for the new update—it's super neat! :)
Gemini is now up and running perfectly for me.
I even got Text Translator2 to work! Turns out, you don't need to put the value in a JSON array. Just use this for the Body: source_language=en&target_language=hu&text=%text%, and it worked :)
All the accessible APIs from rapidapi.com are working now. I've tested quite a few, and they've all been successful, so I'm guessing the rest should work too, assuming they're available. (A couple aren't, unfortunately.) This means we can now use not only APIs from the Translation category but also AI APIs from the Artificial Intelligence/Machine Learning category for translations.
I also tested the Azure AI Translator, and it worked without a hitch. It has an automatic limit of 2 million characters per hour, and once you hit that, it'll stop working. You can find more details here: Service limits for Azure AI Translator Service. I found it pretty straightforward to set up, and I'm just an average person :) You need to register, which requires a credit card, then go to 'Create a resource', search for 'Translator', and hit 'create'. Fill in your details like name, region, and select the F0 free tier. Hit 'create' again, and you're all set.
Here's how to configure it:
Azure AI Translator:
URL:
https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&to=your_language_code
Headers:
{
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "YOUR_API_KEY",
"Ocp-Apim-Subscription-Region": "YOUR_REGION"
}
Body:
[
{
"Text": "%text%"
}
]
Text Output Path:
.translations[0].text
Now, the Cloud Translation API is a bit different; it doesn't have an automatic limit. This could be a bit risky if you're not paying attention, because if you go over the 500,000 character/month limit, you'll automatically start paying. But don't worry, you can set up a Budget Alert. You could, for example, set a $1 limit and then get email notifications when you've used 50%, 90%, 100%, and even 150% of that amount. Setting this one up was pretty simple too. If I remember correctly, you just need to enable this: Cloud Translation API (which also requires a credit card), create an API key, and you're good to go.
And here's how to use it:
URL:
https://translation.googleapis.com/language/translate/v2?key=YOUR_API_KEY
Headers:
{
"Content-Type": "application/json"
}
Body:
{
"q": "%text%",
"source": "en",
"target": "hu"
}
Text Output Path:
data.translations[0].translatedText
Seriously, thanks again for all your hard work. This is a massive help! :)
Heya,
I've done further testing and I believe that most of the problems I've had with getting sensible output for LLM models is that they seem oddly specific in how you need to prompt for translations (and also not specific at all...)
For example;
Using this model for Japanese to English: https://huggingface.co/lmg-anon/vntl-gemma2-2b-gguf
This is their example prompt;
<<METADATA>> [character] Name: Uryuu Shingo (瓜生 新吾) | Gender: Male | Aliases: Onii-chan (お兄ちゃん) [character] Name: Uryuu Sakuno (瓜生 桜乃) | Gender: Female <<TRANSLATE>> <<JAPANESE>> [桜乃]: 『……ごめん』 <<ENGLISH>> [Sakuno]: 『... Sorry.』<eos> <<JAPANESE>> [新吾]: 「ううん、こう言っちゃなんだけど、迷子でよかったよ。桜乃は可愛いから、いろいろ心配しちゃってたんだぞ俺」 <<ENGLISH>>
I tried to prompt it like this before;
<<TRANSLATE>><<JAPANESE>>%text%<<ENGLISH>>
But it gave Japanese responses about 50% of the time and would also use a shitton of tokens sometimes.
Changing it to;
<<TRANSLATE>>\n<<JAPANESE>>\n%text%\n<<ENGLISH>>\n
And voila, works pretty much just like intended. Although it seems to disregard translating parts of paragraph text sometimes. (It is much easier to see why \n could do any difference if you go to the link. The formatting on here breaks the structure.)
Even just putting;
Translate the following sentence from English to Japanese:\n\n%text%\n\nTranslation:
As the prompt worked much better than the first option.
In regards to the other API issues - I'm working on it. Might have fixed it but I need to do a little bit more testing tomorrow before releasing a beta version. :)