[Solved] Translating text in screens

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.
Post Reply
Message
Author
User avatar
ComputerArt.Club
Veteran
Posts: 427
Joined: Mon May 22, 2017 8:12 am
Completed: Famous Fables, BoPoMoFo: Learn Chinese, Santa's workshop, Cat's Bath, Computer Art Club
Location: Taiwan
Contact:

[Solved] Translating text in screens

#1 Post by ComputerArt.Club »

So I am just beginning my first translation attempt of one of my games and I have come across a problem. When generating translation files Renpy does not see the text inside my custom screens. Here is an example from a game:

Code: Select all

screen quiz_p3b:
        use quiz_t3 id "quiz_t3"
        text "English English English English?" xalign 0.5 yalign 0.03            
These text blobs, which I have long known not to be exported when exporting the game dialog, also don't get exported in the screens.rpy translation files.

Is there a way for me to manually refer to the location?

Thanks for taking the time to read this!
Last edited by ComputerArt.Club on Sat Apr 20, 2019 11:36 am, edited 1 time in total.

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: Translating text in screens

#2 Post by Remix »

text _("English")

The _() function basically tells Ren'Py to register the string as translatable, so it will add it to the relevant translation file when asked.
Frameworks & Scriptlets:

User avatar
ComputerArt.Club
Veteran
Posts: 427
Joined: Mon May 22, 2017 8:12 am
Completed: Famous Fables, BoPoMoFo: Learn Chinese, Santa's workshop, Cat's Bath, Computer Art Club
Location: Taiwan
Contact:

Re: Translating text in screens

#3 Post by ComputerArt.Club »

Remix wrote: Mon Apr 15, 2019 1:23 pm text _("English")

The _() function basically tells Ren'Py to register the string as translatable, so it will add it to the relevant translation file when asked.
Thanks again Remix! That did it! You are amazing!

Post Reply

Who is online

Users browsing this forum: Andredron, Google [Bot]