I'd like to allow players to drop their self-translated .rpy files into the tl (translation) folder, and have the game create a menu that would allow them to select whatever languages are in that folder.
How would one go about doing this? Would this require the use of renpy.exists to check if a certain language is inside the folder?
Thank you in advance for any tips or advice!
Best Way to Allow Players to Add a Translation Patch
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
- Remix
- Eileen-Class Veteran
- Posts: 1628
- Joined: Tue May 30, 2017 6:10 am
- Completed: None... yet (as I'm still looking for an artist)
- Projects: An un-named anime based trainer game
- Contact:
Re: Best Way to Allow Players to Add a Translation Patch
You'd want renpy.known_languages. It *should* return a list that reflects the folder names in /tl/ if I remember right. Note though that some languages might also need different fonts, so you'd want to allow for that in your *blank* translate file(s) etc
Frameworks & Scriptlets:
- Speech Bubble dialogue system
- Multiple Notify with ATL and history
- (WIP) Radial Masking - needs updating to use Shader
- 7.4 - Smooth Tinting using ATL and matrixcolor
- Several other repositories there too
- Obscura
- Eileen-Class Veteran
- Posts: 1431
- Joined: Fri Mar 09, 2012 6:58 pm
- Projects: Coming Out On Top
- Location: United States
- Contact:
Re: Best Way to Allow Players to Add a Translation Patch
Thanks Remix!!!
Do you know where I can find any examples of this in action? I'm scratching my head over the syntax.
Do you know where I can find any examples of this in action? I'm scratching my head over the syntax.
- Remix
- Eileen-Class Veteran
- Posts: 1628
- Joined: Tue May 30, 2017 6:10 am
- Completed: None... yet (as I'm still looking for an artist)
- Projects: An un-named anime based trainer game
- Contact:
Re: Best Way to Allow Players to Add a Translation Patch
Which bit?
Changing fonts etc:
https://www.renpy.org/doc/html/translat ... anslations
You might do well to try a single language translation yourself and seeing exactly what needs adding to the /tl/ subfolder, then use your experience to guide other people...
Simple screen:
Fly-typed, so might need tweaks
Changing fonts etc:
https://www.renpy.org/doc/html/translat ... anslations
You might do well to try a single language translation yourself and seeing exactly what needs adding to the /tl/ subfolder, then use your experience to guide other people...
Simple screen:
Code: Select all
screen choose_language():
vbox:
textbutton "Default":
selected (_preferences.language == None)
action [
Function(renpy.change_language, None),
Function(renpy.restart_interaction) ]
for language in renpy.known_languages():
textbutton "{}".format(language.capitalize()):
selected (
_preferences.language == language )
action [
Function(renpy.change_language,
language),
Function(renpy.restart_interaction) ]
Frameworks & Scriptlets:
- Speech Bubble dialogue system
- Multiple Notify with ATL and history
- (WIP) Radial Masking - needs updating to use Shader
- 7.4 - Smooth Tinting using ATL and matrixcolor
- Several other repositories there too
Who is online
Users browsing this forum: BeverlyLane