richycapy wrote: ↑Mon Jun 03, 2019 8:40 pmHi
Im doing this:
And its not doing anythingCode: Select all
vbox xalign 1.0 yalign 1.0: if baselang == 'spanish': imagebutton auto "images/gui/botones/english_%s.png" hovered tt.Action("Play game in english") action else: imagebutton auto "images/gui/botones/spanish_%s.png" hovered tt.Action("Juega el juego en español") action Language("spanish")
It did change to spanish, but is not changing back to english, also, is there a way to restart the game after changing the lenguage?
Code: Select all
translate.rpy
init -3 python:
if persistent.lang is None:
persistent.lang = "english"
lang = persistent.lang
init python:
config.main_menu.insert(3, (u'Language', "language_chooser", "True"))
init python:
if lang == "english":
style.default.font = "font_name_here_1.ttf" #english font here
elif lang == "russian":
style.default.font = "font_name_here_2.ttf" #russian font here
Code: Select all
Screen perfirence:
.......
.......... vbox xalign 1.0 yalign 1.0:
................imagebutton..... action Language(None)
................ imagebutton..... action Language("russian)