Ren'Py How to change the initial language?

Flower34234

Newbie
Apr 3, 2020
23
17
I have tried with, in screens :
Python:
init -3 python:
    if persistent.lang is None:
        persistent.lang = "english"
    lang = persistent.lang

but it does not work
 

Wumei

New Member
Dec 25, 2019
5
1
Try this :

Python:
init -3 python:
    if config.language = None:
        config.language = "english"
But except if you realy need the conditional part you can use that:

Python:
init -3 python:
    config.language = "english"
 

Black Ram oss

Black Ram
Game Developer
May 10, 2018
582
1,544
Python:
put on later :
################################################################################
## Initialization
################################################################################
init offset = -1

this :
Python:
# initial language
define config.language = "english"
I used it in my game too, it works 100%
 
  • Love
Reactions: Flower34234

Flower34234

Newbie
Apr 3, 2020
23
17
Python:
put on later :
################################################################################
## Initialization
################################################################################
init offset = -1

this :
Python:
# initial language
define config.language = "english"
I used it in my game too, it works 100%
Thanks it works perfectly
 

yuqiu314

New Member
May 4, 2018
4
2
If you are still in the early stage building a game, you may try to create a new project again.

Before you create the new project, click 'preferences' in RenPy Launch. Select the language you prefer.
Then create the new project. The language you selected will be the default one.

The Launch helps you to deal with UI text, font files, etc. It is a time saver.



BTW, the previous code seems to be from some deprecated documents. Please be aware.