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.
-
srksrk 68
- Regular
- Posts: 30
- Joined: Fri Jul 19, 2019 8:10 pm
-
Contact:
#1
Post
by srksrk 68 » Fri Aug 27, 2021 11:14 am
Hello,
I have a game where a character has the name "June". Now when translation comes into play, this name is translated by the say function to, e.g. German "Juni" which is the translation for the month "June" into German. However, I do not want to translate that character's name but only the occurances where the month is meant, e.g. in the savegame dialog. How can this be achieved?
The character is defined as:
Code: Select all
june = Character('June', color='c2e8cd')
In the game script we have something like this:
The resulting say dialog box in the German translated game displays:
Juni
irgendwas
This is not what I want. How can I make this into the following?
June
irgendwas
-
BrumaDev
- Newbie
- Posts: 11
- Joined: Wed Apr 28, 2021 9:08 pm
- Projects: Occult:Rewrite
- itch: brumadev
- Location: Brazil
-
Contact:
#2
Post
by BrumaDev » Fri Aug 27, 2021 12:36 pm
I'm not 100% sure I understand the question, however, you can single out a translation by adding "_()" to it. e.g:
Code: Select all
june = Character(_("June"), color='c2e8cd')
Which will prompt the translation engine to always translate that singled out piece of text as whatever you want it to be. In theory it would let you keep it consistent through languages. (Just translate "june" as "june")
Do you like VNs with more
gameplay?
Are you interested in the
paranormal?
Check out my new project
Occult:Rewrite

-
Ocelot
- Eileen-Class Veteran
- Posts: 1883
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
-
Contact:
#3
Post
by Ocelot » Fri Aug 27, 2021 2:00 pm
Documentation wrote:
#
Text tags beginning with # are ignored, but can be included to distinguish strings for the purpose of translation.
"New{#playlist}"
https://www.renpy.org/doc/html/text.html#text-tag-#
< < insert Rick Cook quote here > >
-
srksrk 68
- Regular
- Posts: 30
- Joined: Fri Jul 19, 2019 8:10 pm
-
Contact:
#4
Post
by srksrk 68 » Fri Aug 27, 2021 5:36 pm
BrumaDev wrote: ↑Fri Aug 27, 2021 12:36 pm
I'm not 100% sure I understand the question, however, you can single out a translation by adding "_()" to it. e.g:
Code: Select all
june = Character(_("June"), color='c2e8cd')
Which will prompt the translation engine to always translate that singled out piece of text as whatever you want it to be. In theory it would let you keep it consistent through languages. (Just translate "june" as "june")
Thanks for the replies, but that does not seem to be what I am looking for...
The first solution is for the other way round, to achieve that character names are translated. I do want them to be *not* translated.
The second solution I cannot bring to work. If I write "#June", it will be displayed as #June, i.e. not translated but with a leading #. If I write "{#June}", nothing will be displayed as the whole tag is being ignored. And if I write "{#<something>}June" or "June{#<something>}" or similar, the # tag will be ignored but June will still be translated.
Also, I would rather like to have a solution where *no* character name is being translated, not just those that I rename in a specific manner. I hoped that would be possible because I find so many solutions like the first one above, for achieving exactly what I want to avoid. So I hoped that must be possible somehow...
Edit: typos.
-
Ocelot
- Eileen-Class Veteran
- Posts: 1883
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
-
Contact:
#5
Post
by Ocelot » Sat Aug 28, 2021 2:35 am
srksrk 68 wrote: ↑Fri Aug 27, 2021 5:36 pm
if I write "{#<something>}June" or "June{#<something>}" or similar, the # tag will be ignored but June will still be translated.
By whom? The purpose of # tag is to generate different translatable entries for June{#month} and June{#chatacter}. Then you can just... not translate entries you don't want.
srksrk 68 wrote: ↑Fri Aug 27, 2021 5:36 pm
Also, I would rather like to have a solution where *no* character name is being translated, not just those that I rename in a specific manner.
While this is might not be on your list of priorities, but if your game will be translated into language using non-latin alphabet, all names will have to be translated, or, rather, transliterated.
< < insert Rick Cook quote here > >
-
srksrk 68
- Regular
- Posts: 30
- Joined: Fri Jul 19, 2019 8:10 pm
-
Contact:
#6
Post
by srksrk 68 » Sat Aug 28, 2021 11:48 am
Ocelot wrote: ↑Sat Aug 28, 2021 2:35 am
srksrk 68 wrote: ↑Fri Aug 27, 2021 5:36 pm
if I write "{#<something>}June" or "June{#<something>}" or similar, the # tag will be ignored but June will still be translated.
By whom? The purpose of # tag is to generate different translatable entries for June{#month} and June{#chatacter}. Then you can just... not translate entries you don't want.
srksrk 68 wrote: ↑Fri Aug 27, 2021 5:36 pm
Also, I would rather like to have a solution where *no* character name is being translated, not just those that I rename in a specific manner.
While this is might not be on your list of priorities, but if your game will be translated into language using non-latin alphabet, all names will have to be translated, or, rather, transliterated.
Thanks, I now figured it out. You need to give the # tag in the translation file as well, and in the say dialogs. For example:
old "{#month}June"
new "{#month}Juni"
This way, a character with name "June" will not be translated.
Users browsing this forum: Google [Bot]