Age verification.

By clicking enter, I certify that I am over the age of 21 and will comply with the above statement..

Enter

Or


Exit
Home - *Download* - Road Map - Contact - My tool
Version française

Tool for semi-automatic translation of Renpy language files with api DeepL


I have created 3 php scripts that automatically translate all files generated by Renpy :
- A script that will mount the Renpy translation files in a database. - A script to automatically send each text to the api of DeepL in php.
- A script to rewrite the parts "to be translated" without risk of destruction.
The translation is generated via the api of DeepL and takes 10 min per 100,000 words.
I'm looking for a beta-tester to finalize the tool.
For the moment, I am 99% successful in translating without error. New/old are managed.
The remaining errors : Some tags get lost sometimes when passing through DeepL: {color}, {t}*, some ".
Now you just have to copy and paste the files created by the script in your tl/yourlanguage/
directory. Possibly use WinMerge to validate the quality of the translation.

Procedure to automatically translate your projects renpy


- Generate your translation files by following this tutorial: https://www.youtube.com/watch?v=ARVom9OggwU&feature=emb_logo
- Send me your generated files to creerjeuvideoseul @ free.fr(without space). Send your .rpy files containing the text to be translated. (not the source code, just the directory: tl/yourlanguage/*.rpy)
- Add the following information :
-- Source language (to be chosen on DeeplL)
-- Destination language (to be chosen on DeeplL)
-- The name of the game (if I already did it).
-- and the number of characters to be translated.
That's it.
Once the option is reliable, I would automate it online.
DeepL charges 1€ per 100,000 characters. It's quite expensive.
You can see the number of characters in your project by clicking on "Check your script". I reserve the right to refuse projects, or I will charge the cost price. (2€ per 100 000 characters)
The complete translation of my game cost me 4€, it's worth it !
=> Become Patreon 5€, I offer you a translation of your choice:-)


Before : After : New/old is ok.

The PHP source code of the api call DeepL for the RENPY translation:


$curl = curl_init();

$headers = array();
$headers[] = 'Content-Type: application/x-www-form-urlencoded';

curl_setopt($curl, CURLOPT_URL, "https://api.deepl.com/v2/translate");
curl_setopt($curl, CURLOPT_CAINFO, dirname(__FILE__)."/cacert.pem");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_POSTFIELDS, "auth_key=".$authkey."&target_lang=".$langueTarget."&source_lang=".$langueSRC."&text=".$textToTranslate."");

$urlCall = "https://api.deepl.com/v2/translate?source_lang=".$langueSRC."&target_lang=".$langueTarget."&auth_key=".$authkey."&text=".$textToTranslate;

if (!$response = curl_exec($curl)) {
$errorTab = curl_error($curl);
}
else {
$responseArray = json_decode($response);
}

Finalize the translation of your project

. Once the language files have been updated.
Go to screen.rpy in the screen preferences(): and add :
style_prefix "radio"
label _("Language")
textbutton _("French") action Language(None)
textbutton _("English") action Language("english")
This will open the language selection menu to your user.

Renpy's limitations and translations

Please note, ANY changes to the content of your first language will create a new variable in your language file. Untranslated.
Finalize your code as much as possible before starting the translation. It doesn't seem possible to add a sentence manually, you have to go through Renpy's language generation interface again because it uses a MD5.
type signature. The source after # in the trad file is useless, it's only a comment !
  • Patreon
  • Download game
© Design by 2018 Evelyn