Tool Ren'Py Ren'py realtime translator Mod[v0.10]

Jul 28, 2025
90
32
Hello,
Thank you very much for your work.
What else do we need to do besides copying the files you specified to the game folder?
Here is how you should edit the transconfig.rpy
I will explain line by line
init -999 python:
global ENABLE_TRANSLATION
ENABLE_TRANSLATION =True#The translator switch
global TARGET_LANGUAGE
TARGET_LANGUAGE = "de"#change it to your target language ISO language code
global FONT_SIZE_ADJUSTMENT_CONFIG
FONT_SIZE_ADJUSTMENT_CONFIG = {
'enabled': True,#If you want to use translated text size adjust
'min_scale': 0.7,#min size adjust ratio
'max_scale': 1.2,#max size adjust ratio
'length_threshold': 2,
#Translated text length trigerrs the size adjust.2 means it should more than twice longer than the original
}
global time_interval
time_interval=3
#time interval of the translate request. for google 1 is fine for llm you should refer to your api provider for rate limit
global TRANS_FONT
TRANS_FONT="GoNotoCurrent-Regular.ttf"
#The default fonr. for translation you can replace it with any other fonts support your target language
 
Last edited:
Jul 28, 2025
90
32
Here is how you should edit llmtransconfig.rpy
Still line by line.
init python:
global TRANSLATION_SERVICE
global API_KEY
global BASE_URL
global MODEL
TRANSLATION_SERVICE = "LLM" # "google" or "LLM"
API_KEY ="Your-API-Key-Here" #Ask your llm api provider for api key
MODEL = "meta-llama/llama-3.3-8b-instruct:free" # choose The model allows nsfw content
BASE_URL = " " #please refer to your model provider python api for the correct URL,model and api-key,default is for openrouter.ai
global MAX_TOKENS
global TEMPERATURE
global TIMEOUT
global PROXIES
global PROXIES_ENABLED
MAX_TOKENS = 8000 #max tokens one request
TEMPERATURE = 0.05
TIMEOUT = 60
global APPENDED_LINES
APPENDED_LINES = 50 #Number of previously translated lines to append as context
PROXIES = {}
PROXIES_ENABLED = False #default to False
global TRANSLATION_PROMPT#The default language to translate is English,You can modify the prompt to change the source language if needed.
TRANSLATION_PROMPT = r"""You are a professional game localization expert. Please translate the following renpy game text from English to {target_lang}.
Translation requirements:
1. Maintain game terminology consistency
2. Preserve all HTML tags, format codes and special marks (such as {{color=#ff000}}red text{{/color}})
3. Special attention: The text may contain <code id="...">...</code> tags. The content inside these tags must not be changed under any circumstances and must be preserved as is.
4. Maintain the natural fluency of game dialogue
5. Adapt to the personality characteristics of game characters
6. Preserve all programming-related symbols (such as %variable%, [option], etc.)

Previously translated texts for reference:
{context}

Please translate the following content:"""
 

reitzh

Newbie
Feb 25, 2023
22
8
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.


The label before_main_menu is defined twice, at File "game/realtimetrans.rpy", line 189:
label before_main_menu:
and File "script.rpyc", line 222:



Ren'Py Version: Ren'Py 7.6.3.23091805
Sat Sep 6 09:19:49 2025


again??
 
Jul 28, 2025
90
32
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.


The label before_main_menu is defined twice, at File "game/realtimetrans.rpy", line 189:
label before_main_menu:
and File "script.rpyc", line 222:



Ren'Py Version: Ren'Py 7.6.3.23091805
Sat Sep 6 09:19:49 2025


again??
This error occurred because my custom label name before_main_menl is same with the game's label name.Change the label name will fix the problem.I will change the label name to another name to avoid repeat in next update.
 

reitzh

Newbie
Feb 25, 2023
22
8
Sorry.it seems that the problem is more complicated than changing the label name as before_main_menu is a certain label in Ren'py.Try to use this file.New label should run after the existing label.
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.


File "game/realtimetrans (1).rpy", line 413: expected ':' not found.
init python after:
^

Ren'Py Version: Ren'Py 7.6.3.23091805
Sat Sep 6 15:58:51 2025
 
Jul 28, 2025
90
32
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.


File "game/realtimetrans (1).rpy", line 413: expected ':' not found.
init python after:
^

Ren'Py Version: Ren'Py 7.6.3.23091805
Sat Sep 6 15:58:51 2025
Sorry for all the bugs.This should work, i tested it in Renpy 7.5.2
 

cemo45

New Member
May 29, 2018
14
1
Dude, I did everything you said. The game starts and the translation is done, but after 3-4 scenes it stops. When I exit the game and enter it again, it doesn't translate at all.
 
Jul 28, 2025
90
32
Dude, I did everything you said. The game starts and the translation is done, but after 3-4 scenes it stops. When I exit the game and enter it again, it doesn't translate at all.
Are you using google or llm?
If you are using llm ,this might because of your api rate limit.
If you are using google,i need more details.
 
Jul 28, 2025
90
32
I'm using LLM. I think the API KEY doesn't allow for a certain translation because it's paid?
I think you should ask your llm api provider instead of me as i know nothing about the api you use.
Based on your description, my guess is that your time_interval is set too low that you hit the rate limit of the api.