I Wani Hug that Gator!

I Wani Hug that Gator!

Not enough ratings
Localize the gator (and mods) WIP
By Veado-campeiro
How to translate IWHTG and the Workshop Mods to another language, with or without machine assistance.
   
Award
Favorite
Favorited
Unfavorite
Introduction
The official way translations have been added to the game is through the work of volunteers, they translate the whole game manually, including the art assets, and then send it to the developers for approval, if it's up to their standards, it gets added to the game as an update. However, since the community is fragmented between steam, reddit, discord servers and such, it can be quite difficult to communicate with your fellow speakers and avoid duplication of efforts, so I suggest doing this instead:

¹. Ask around for any translation projects for your language, if one already exists, consider helping their project instead of creating one.
2. If there are no projects, use Trans_tools to create a basis for your localization using machine translation. (Optional)
2. Upload it to the workshop and a public git repository;
3. Work on fixing the automatic translation whenever is convenient for you, manually translate some dialogue and upload the changes to both the Workshop and git repository.

The purpose of this is to release your translation before you spend too much time with it, this comes with some benifits: If other speakers of your language were thinking of starting their own project, they can find yours and contribute to it (setting up a git repository will make this much more convenient), and if said speakers were already almost finished with their own translation, you didn't waste too much of your time. The second hypothetical happened to me, so I speak from experience.
About the use of machine translation, i don't think it's good enough to be used by itself, so you will still have to go through the whole game looking for errors, therefore your translation won't be done any quicker, but it won't be slown down either. What machine translation will allow you to do is to release a better version of an unfinished translation sooner.
Also, make sure to read the developer's README.txt on Wani-Translation-Kit's git [git.cavemanon.xyz]. The repository and most of the README.txt is concerned with translating image assets, but the last section has instructions on translating dialogue. Following the README.txt and all the subsequent ones was enough for me to start my translation, but I had to figure out a few things along the way, so this is what the rest of this guide is for.
I'm not going to be covering the translation of the art assets, as I have never actually translated them, follow the instruction on the README.txt for that.
I will be demonstrating the steps using a Linux terminal, but you don't have to, you will be able to follow it in other operating systems and file managers.
You will also to need install git and python, explaining in detail how to install them and how they work would be beyond the scope of this guide, so you may need to find tutorials somewhere else.
Assemble the game's Renpy Project
As is written on line 289 from the kit's README.txt, you will need IWHTG's Renpy project files, so follow the link[git.cavemanon.xyz] and read the instructions:



As of 2025, downloading it as a ZIP file doesn't work, so you need to clone it using git.



Remove Demo Project's game folder, copy full game's game folder from your steam installation:



Edit the files using whatever text editor you prefer (both files can be found inside the Project's base folder),
below is what they should look like:

android.json
{ "expansion": false, "google_play_key": null, "google_play_salt": null, "heap_size": "3", "icon_name": "I Wani Hug That Gator", "include_pil": false, "include_sqlite": false, "layout": null, "name": "I Wani Hug That Gator", "numeric_version": 1, "orientation": "sensorLandscape", "package": "cavemanon.wani.full", "permissions": [ "VIBRATE", "INTERNET" ], "source": false, "store": "none", "update_always": true, "update_icons": true, "update_keystores": true, "version": "INTERNAL-BUILD" }

renconstruct.toml
[tasks.patch] type = "custom" enabled = true ver = "8.3.4" [tasks.keystore] # required if matching task is enabled enabled = true type="keystore" priorities = { pre_build = 0 } # the priority that determines the orders tasks will run in, defaults to 0 on_builds = ["android_apk", "android_aab"] # builds this task should run for, defaults to all android builds [...]

And that's it, you now have the full game's project files, "IWaniHugThatGator-Demo-Public" isn't an accurate name anymore, you could rename the folder but I didn't bother .
Generate translation strings
On the kit's README.txt, the developers tell us to download Ren'Py SDK 8.3.4[www.renpy.org], which isn't the latest version, I don't know if grabbing the latest could cause issues, but the 8.3.4 is guaranteed to work, for now at least.



Download it, unpack it and choose your language. Then, make a copy or move IWHTG project files inside Ren'Py SDK folder.



You should now see I Wani Hug that Gator project on the SDK, if not try clicking the refresh button.



Select IWaniHugThatGator-Demo-Public (or whatever you have renamed it to) and click on "Generate Translations". Make sure that you use a language code, the kit's README.txt has a list of them, and also make sure that you deselect "Generate empty strings for translations", otherwise you won't be able to use Trans_tools. Then click "Generate Translations".



After it's finished, it will say "Ren'Py has finished generating xxx translations", click "Continue" and then click "Extract Dialogue", select "Dialogue Text Only (dialogue.txt)" and then "Continue".



When it's done, you will see "Ren'Py has finished extracting dialogue. The extracted dialogue can be found in dialogue.txt in the base directory", the base directory Renpy is refering to is the Project's base directory. Even though the translation files do exist, if you try to launch the project, you will not be able to select the language from the menu, first you need to modify a file so that the menu option is enabled. The file is located on .../game/00src/translation.rpy, on line 66 there will be all the menu options for languages, add yours to the list.

[...] languages = [ {'image': 'gui/flag/USofA.png', 'name': 'English', 'value': 'en' }, {'image': 'gui/flag/Mexico.png', 'name': 'Español', 'value': 'es'}, #total ESL win {'image': 'gui/flag/Russia.png', 'name': 'Русский', 'value': 'ru'}, # We did our part! @Snootranslators {'image': 'gui/flag/Poland.png', 'name': 'Polski', 'value': 'pl'}, # hello there {'image': 'gui/flag/Sweden.png', 'name': 'Svenska', 'value': 'sv'}, # Enjoy the surstromming {'image': 'gui/flag/Thai.png', 'name': 'ภาษาไทย', 'value': 'th'}, # I yedkae! {'image': 'gui/flag/YOURFLAG.png', 'name': 'YOURLANGUAGE', 'value': 'xxx'} # Add this line with your language ] [...]

Very important: Be careful with indentation, you must use spaces, if you use tabs you will cause an error, you could also just copy and modify one of the other lines. You must also add a comma to the end of the second to last line otherwise the project also won't launch. With the file edited you can launch the project and check if the translation works, but don't forget to add your country's flag to the folder .../gui/flag/ either, and make sure it's a reasonable resolution, somewhere around 640x360, if it's too big you will end up covering the other flags.



If you picked your language you should be able to play the game normally with english text, at this point you could already start translating the game by editing the files located on .../game/tl/xxx by modifying the lines that start with "new" with your translation.

.../game/tl/xxx/common.rpy
# TODO: Translation updated at 2025-05-24 14:39 translate xxx strings: # renpy/common/00accessibility.rpy:28 old "Self-voicing disabled." new "Self-voicing disabled." #Translate this line # renpy/common/00accessibility.rpy:29 old "Clipboard voicing enabled. " new "Clipboard voicing enabled. " #Translate this line [...]
Use Trans_tools for machine translation (Optional)
Just like the Renpy project, you will need to clone Trans_tool's using git. And do keep in mind that even though you could try translating all .rpy files, the only ones that are guaranteed to actually be translated are the ones inside of .../game/tl/xxx/script folder. So you will need to manually translate the rest of the .rpy files, in our case, they are mainly menu options, discord presence and others, it also includes the choices the player has to make throughout the gameplay. The menu options can be translated in: .../game/tl/xxx/common.rpy

There are two README.md files on Trans_tools' git page, make sure to read this one[git.cavemanon.xyz].



As is written on the README.md, you need two dependencies, googletrans==3.1.0a0 and colorama. The installation process for these depends on your operating system, on Linux for example, you may need to create a virtual environment, if that's your case, I recommend creating the virtual environment inside Auto_trans folder, since that's where all of the scripts we will use are located.



After both dependencies are installed, move or copy the contents of .../game/tl/xxx/ to the .../Trans_tools/Auto_Trans/scripts/ folder. And dialogue.txt to the .../Trans_tools/Auto Trans/ folder (As was said in the previous section, it can be found on the Project's base file). Also, even though Translator.py script is recursive, the Applier.py script isn't. So there should not be any folders inside the .../Trans_tools/Auto_Trans/scripts/ folder



Before you initiate the scripts, edit Translator.py and modify the line 34 to the language you wish to translate to



Run Parser.py and then Translator.py, it will take a while. If you don't run Parser.py first you will encounter an error such as "error on line 50, 'original.csv' not found".



If you experience connection loss during the process, you will get errors and the script may quietly exit without completing the whole translation.



Here's what a successful run of the script should look like:



Now that it's translated, you need to generate the output files by running Applier.py, once again, the Applier.py isn't recursive. The script runs instantly, and then it's just a matter of puttin the translated .rpy files back in their respective folder. Make sure to launch the project from the Ren'Py sdk to check if there are no parsing errors.
Upload to the workshop
Before uploading to the workshop, copy your changes to the steam installation of IWHTG as a mod to make sure everything works fine. For your mods to work, you must replicate the folder structure for the file you want to change, for example:

So that your mod modifies the file: .../I Wani Hug that Gator!/game/00src/translation.rpy
You must create a file located on: .../I Wani Hug that Gator!/game/mods/YOURMOD/game/00src/translation.rpy

For a translation mod, you must have these three files and their folder structure.

(Enable menu option)
.../I Wani Hug that Gator!/game/mods/YOURMOD/game/00src/translation.rpy
(Add your flag)
.../I Wani Hug that Gator!/game/mods/YOURMOD/game/gui/flag/YOURFLAG.png
(Your translation)
.../I Wani Hug that Gator!/game/mods/YOURMOD/game/tl/xxx/(all the translation files)

In theory you could dispense the use of .../YOURMOD/game/... folder, by checking the option "Use absolute path" on the mod uploader, but I didn't do it with my translation. More information on the mod uploader later on.

All mods will also need a metadata.json file to create an option for your mod on the in-game mod menu.
.../I Wani Hug that Gator!/game/mods/YOURMOD/metadata.json

You can find how to create a metadata file with the following guide, It will also teach how to upload your mod to the workshop.
https://steamcommunity.com/sharedfiles/filedetails/?id=3218744148

IMPORTANT NOTES: If you used the .../YOURMOD/game/... structure I wouldn't select the option to "Use absolute path", I also did not select the option "Convert .rpy files to .rpym". Also it seems to use Vulkan for it's gui, so you will need a supported graphics card.
Translate workshop mods WIP
I know for a fact that there is a much better way to translate mods, for example this spanish translation:
https://steamcommunity.com/sharedfiles/filedetails/?id=3229099355
It is a much better implementation and has several advantages:

1. Title and descriptions are translated.
2. Is only applied when the game's language is set to a specific language.
3. Doesn't overwrite the original mod's file.

I tried copying the anon's file structure a while back but I couldn't figure it out, so at least for now I will settle for how I managed to get my translation working, which is just overwriting the target mod's script file:

.../game/mods/YOURMOD/game/mods/TARGETMOD/...
Feedback and Contributors
If you encounter any new problems or you think a section needs to be better clarified, please let me know, I will try to keep this guide updated and mantained. You can discuss translation on AskaGoat's thread. Thanks to AskaGoat for feedback and encouraging me to write this guide in the first place.

Also, if you're working on a fan translation you can tell me and I will put your project in this guide, that way it will be easier for you to find volunteers and make sure there are no duplication of efforts
2 Comments
Veado-campeiro  [author] Jun 3 @ 5:55am 
Machine translation may not make your translation any faster, but it won't slow it down either. I would only use it to create a basis so you can release a better translation to the public sooner. For example, instead of releasing a translation that is 50% manually translated and 50% untranslated. You could release one that is 50% manually translated and 50% machine translated.
Releasing an unfinished translation as a mod would help you find volunteers and proof readers and also avoid duplication of effort if someone already began their own translation to your language.
Sebek Fereh Ra Jun 3 @ 5:06am 
Is the automated translation even any good? Or does it require a lot of manual revision? Perhaps it depends on the language - I haven't used those scripts because translating between English and Polish on Google Translate absolutely sucks balls and would require me to fix everything manually anyway...