Let me start by saying that I’m a big fan of Zelda. I did not make this game.
This game has also been posted several times on these forums.
When I saw there was a Zelda game made with Eclipse, and the full source was available,
I was super excited. Sadly, it was in Spanish.
But then I thought to myself… There are a lot of translation websites out there. How hard would it be to leverage their APIs to translate this (or anything) on the fly?
Well, it was more work than I had originally thought. I first had Google Translate in the DLL, but it didn’t work well with quotation marks or certain phrases, so I kept looking. Then I found Bing. Then I found Yelp.
You must register the C# Gtranslate.DLL in a special way, and the .net Framework is required to be on your computer in order to do so. Please see the Starter section below for details.
I didn’t want to write the code in VB, as it would have been ugly and a pain in the butt, so I packaged it all together in a C# DLL.
(This was my first C# project. Ever. I’m also not a fancy VB programmer. So be nice!)
There are 6 parts to this project.
This was originally just going to support Google, but it expanded as I worked with it.
I didn’t really plan on releasing it, but it was so much fun working with and experimenting with this that I hope someone else can benefit from my work.
It currently supports Google, Bing, and Yandex translation. Google doesn’t have “free” translation services, but we use their website and parse the return information anyway. Bing and Yandex both require registration to use, but are free for a certain number of uses. Bing has a 2 million character per month limit! (While I was developing and translating this game, I went through 50,000 characters in a few days, but it was re-translating the same stuff.)
And Yandex seems to have 10,000 requests per day, which I’ve never run into.
However, with modTranslate, I wrote a caching system that should hopefully fix those small issues.
Actually, the first version just read from/wrote to an ini file with a custom INI module… which worked for the first phases of testing. But was really slow.
So I did some research on how to make it faster and came up with using a Collection. Sadly, I also wanted to load/save it to a file, which meant that it had to store the key as well as the data, so I made it store an array of the key (which I use the MD5 of the original string for.)
Now, I got that working and wanted to retain the original text that was translated, so I had to work on that… and that lead me to making a second collection.
Anyway, it performs wonderfully. I also wrote a separate application to read/edit the translation files generated.
I wrote this after deciding to use the collections to improve performance. It’s not very feature-packed and some things don’t work 100% as expected. It was more of a proof of concept, but it does work! It’s a little messy, though… I didn’t put much planning into it’s design! Sorry!
The original “The Legend Of Zelda: El Reino Dorado” client has been modified in several different ways.
The biggest change is that I added in my Translation DLL and most of the text in the game is translated on-the-fly!
(Though some text is translated at the Server level, to make things easier.)
Other small changes include WASD controls and more stuff that I can’t think of.
Same as above. It’s the mostly-original “The Legend Of Zelda: El Reino Dorado” server, with some changes thrown into it.
Biggest is, again, the Translation DLL being used for game text and such.
I tried to translate in such a way that wouldn’t hinder performance or cause too many translations to be required, and cache as much as possible. I did not get everything translated, but a lot of it!
The ‘Starter’ program should register/create the TLB and run /codebase on the Translation DLL, which should allow you to use the DLL in your projects.
You’ll have to run this on each computer that will need it (Including the client’s computers.)
but this can be included in your game’s launcher/updater.
It’s a modified version of: http://www.eclipseorigins.com/thread-8117.html
I’ll be honest, I don’t like this updater. It’s poorly built and freezes the app while downloading.
It also doesn’t check each file for integrity against a hash list. I wrote something that does this for an old game engine called Realm Crafter that used MD5 hashes to download updates, but I couldn’t find it so I just grabbed this one.
If you run into problems, refer to this website:
Bing offers a free tier for their translation API,
sign up for the 2 million characters per month plan (free):
Regsiter your “app”
Yandex offers a free translation API as well:
Now, you can elect to bake your unique keys into the DLL and compile it yourself, or you can simply pass it while calling the functions from your project. It’s entirely up to you!
In order to use the GTranslate DLL you must reference it, but it must be registered on the system you’re using it on first.
Call it with BingTranslate(“en”, “es”, “Hola”)
Or see modTranslate for more examples.
Download all projects/files:
Download just my launcher:
(This will download the game and connect to my test server)
Alternatively, if you compile it yourself/run it and connect to TrollParty.org on port 4000.
I’ve just opened a separate server that new accounts are Admins on, simply use port 4001. I call this a ‘Troll’ server, as anyone can do anything (Though kicking and banning is disabled!)
It amazes me at how much content is in this game. It truly does. I’ve got a few friends that will play, so I encourage anyone that’s interested to join in.