Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
label special_menu(*menu_options):
$picks = None
$menu_options = list(menu_options)
$renpy.call_screen("custom_menu", _layer="menus", menu_options=menu_options
return
screen custom_menu:
...(misc code for the menu)...
When I generate translation files, is there any way to have Renpy generate translation lines for strings inside the function? (e.g.,"Go fast." and "Go slow.")
Right now it skips over those strings. I placed an underscore in front of the parentheses but it generates error messages.
Thanks!
Coming Out On Top - An Adult Gay Dating Sim website
!t would be for translating variables in interpolated strings
$ var = _( "English" )
e "[var!t]" # >> translated version
Using just _("String") should be fine in yours and perform the translation as needed.
The other function to note is renpy.substitute( var ) to force the var through translation and tag substitution. (might be renpy.substitutions.substitute() though)