vbox:
style_prefix "radio"
textbutton _("English") action Language(None)
textbutton _("Deutsch (Ohne UI)") action Language("russian")
vbox:
style_prefix "check"
label _("Skip")
textbutton _("Unseen Text") action Preference("skip", "toggle")
textbutton _("After Choices") action Preference("after choices", "toggle")
textbutton _("Transitions") action InvertSelected(Preference("transitions", "toggle"))
######## start around here
vbox:
style_prefix "check"
label _("Skip")
textbutton _("Unseen Text") action Preference("skip", "toggle")
textbutton _("After Choices") action Preference("after choices", "toggle")
textbutton _("Transitions") action InvertSelected(Preference("transitions", "toggle"))
vbox:
label _("Language")
if config.language == None: ############## if the current language is english then show "russian" as a button to click on.
textbutton _("Russian"):
action Language("russian")
else: ################ else show english to click on ;)
textbutton _("English"):
action action Language("english")
Yes, i create translation files.Well, first of all did you create the translation files already? What is the translation folders name? (The /game/tl/None folder is the language in which the script files are written, while any other folder inside the /tl/ folder are translations of the None language)
vbox:
style_prefix "radio"
label _("Lang")
textbutton _("English") action Language(None)
textbutton _("Russian") action Language("Russian")
define config.language = "Russian"
label start:
What do you mean with that? If the options change it is definitely using the right language...The names of the options themselves changes (but this is renpy "self" functional)
I plan to translate the game. But I can not figure out how to make the game read not old files, but translated from tl/Russian/hmmm, did you create the translation files with the ren'py launcher or did you just copy the exact same intro.rpy and translated it then?
There are differences
But usually what you want (if you don't want the english or "None" language at all) is this variable somewhere above label start:
(Please make sure it's really "R"ussian not "r"ussian, python is case sensitive meaning Russian is not russian.)[/code]Code:define config.language = "Russian" label start:
Perhaphs you need to change "persistent.lang" too.
(and put you language changes inside "slashcreen" label so player can choose language before load of main menu)
Also, if the problem is with menus, you need to translate other scripts in /tl/Russian folder, not only script.rpy
init -3 python:
if persistent.lang is None:
persistent.lang = "Russian"
lang = persistent.lang
In any file you want. Ren'py don't care about the files (only "guy.rpy" is hard coded in the core). The only thing you must take care about is the init level, since the said init block will be played according to this level.But in wiki not say, in which file need add it
In any file you want. Ren'py don't care about the files (only "guy.rpy" is hard coded in the core). The only thing you must take care about is the init level, since the said init block will be played according to this level.
init -3 python:
persistent.lang = "Russian"
lang = persistent.lang
File "game/screens.rpy", line 80: python block expects a non-empty block.
init -3 python:
^
File "game/screens.rpy", line 81: expected statement.
persistent.lang = "Russian"
^
File "game/screens.rpy", line 82: expected statement.
lang = persistent.lang
Think in identationThat a problem. I try in various files
Code:init -3 python: persistent.lang = "Russian" lang = persistent.lang
Code:File "game/screens.rpy", line 80: python block expects a non-empty block. init -3 python: ^ File "game/screens.rpy", line 81: expected statement. persistent.lang = "Russian" ^ File "game/screens.rpy", line 82: expected statement. lang = persistent.lang
init -3 python:
persistent.lang = "Russian"
lang = persistent.lang
I know that Ren'py errors can be hard to understand, but it's one of the easiest. If Ren'py complain that the block is empty, it mean that whatever follow is seen as independent from the block.Code:File "game/screens.rpy", line 80: python block expects a non-empty block. init -3 python: ^
image splash1 = "images/splashscreen/splash1.jpg"
image splash2 = "images/splashscreen/splash2.jpg"
image splash3 = "images/splashscreen/splash3.jpg"
label splashscreen:
$ renpy.change_language("russian")
scene black
$renpy.pause(1, hard = True)
show splash1 with dissolve
$renpy.pause(2, hard = True)
hide splash1 with dissolve
show splash2 with dissolve
$renpy.pause(2, hard = True)
hide splash2 with dissolve
show splash3 with dissolve
$renpy.pause(2, hard = True)
hide splash3 with dissolve
return