Ren'Py [SOLVED] How can I add Russian language to the game?

Tigrra

Newbie
Oct 23, 2018
25
19
Okay, complete noob here with zero knowlege about Renpy and gamedev. But I really wanna to create a translation of a game from English to Russian. At first I tried to do it it with Translator++ - It kinda works, but modified game won't launch due to some mistakes. So I tried to change script files manually in a wordpad, and it works! But only in english, cause when I add russian cyrillic symbols ,in the game I'm getting smth like " □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ " . Is there an easy solution for this for a noob like me?
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,960
16,195
So I tried to change script files manually in a wordpad, and it works! But only in english, cause when I add russian cyrillic symbols ,in the game I'm getting smth like " □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ "
Editing the script files ? What script files ? You are talking about the ones in the "game/tl/russian" folder, right ?

This being said, I'm surprised. Ren'py use Unicode fonts, and so far it never had problems to display Cyrillic ; there's enough games with a Russian translation around there to be sure that it's not an exception. Is it possible that your files are simply not saved in UTF-8 ?
 

moskyx

Forum Fanatic
Jun 17, 2019
4,221
13,975
The problem is that the game uses a font that doesn't support cyrilic symbols, so you need to change the font. Did you follow the 'official' translation method (generating translation scripts with Ren'Py SDK) or you are just replacing the text directly in the original scripts?

Either way, it's not that difficult, just take a look at the gui.rpy file and search this line
define gui.text_font
There you'll see the font used. If you are rewriting the original files in Russian, you just need to write there your desired font instead and then add that font (the ttf file) to the "game" folder

In the lines below that one you'll find other fonts used for other texts you see in game (UI menus, character's names...). You can change them the same way, if you're having the same issue there

In my signature there's a link to a translation guide for Ren'Py games. I'm rewriting it right now to add some better practices but the main points are still valid. Translator++ and other translation software tend to create bugs as translation engines have the bad habit of replacing some symbols like brackets and slash bars that are quite important in Ren'Py, that's probably the reason your first attempt was a failure

Edit - now I'm thinking it could actually be an UTF problem as anne O'nymous says, since most of times when a font doesn't contain certain symbols Ren'Py just skip those, it (usually) doesn't add other symbols to replace them. So if the problem were the font used, it should be displaying absolutely nothing and not some strange symbols instead. But... well, check both solutions since sometimes Ren'Py has its own ways
 
Last edited:
  • Like
Reactions: Tigrra

Tigrra

Newbie
Oct 23, 2018
25
19
The problem is that the game uses a font that doesn't support cyrilic symbols, so you need to change the font. Did you follow the 'official' translation method (generating translation scripts with Ren'Py SDK) or you are just replacing the text directly in the original scripts?

Either way, it's not that difficult, just take a look at the gui.rpy file and search this line
define gui.text_font
There you'll see the font used. If you are rewriting the original files in Russian, you just need to write there your desired font instead and then add that font (the ttf file) to the "game" folder

In the lines below that one you'll find other fonts used for other texts you see in game (UI menus, character's names...). You can change them the same way, if you're having the same issue there

In my signature there's a link to a translation guide for Ren'Py games. I'm rewriting it right now to add some better practices but the main points are still valid. Translator++ and other translation software tend to create bugs as translation engines have the bad habit of replacing some symbols like brackets and slash bars that are quite important in Ren'Py, that's probably the reason your first attempt was a failure

Edit - now I'm thinking it could actually be an UTF problem as anne O'nymous says, since most of times when a font doesn't contain certain symbols Ren'Py just skip those, it (usually) doesn't add other symbols to replace them. So if the problem were the font used, it should be displaying absolutely nothing and not some strange symbols instead. But... well, check both solutions since sometimes Ren'Py has its own ways
Changing font actually helped, thank you very much! And yeah, I tried to use Ren'Py SDK but quickly got lost. Anyway, you are my savior! Thank you!
 
  • Like
Reactions: moskyx