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.
define items_db = {
'sigarett': {
'name': _("Цигарка"),
'mind': _('Зменшує стрес на 30%'),
'mind2': _('Можливо трохи зменшить стрес.'),
'desk': _("Пом'ята й стара. Здається, її ще можна використати."),
'desk2': _("Від одної думки про те що це опинеться у роті нудить."),
'image': "images/items/sigarett_simple.png",
},
}
And this is a translation that, in theory, should work, but doesn't. Instead of a translation, you get an untranslated text.
translate english strings:
# game/script/item.rpy:2
old "Цигарка"
new "Cigarette"
# game/script/item.rpy:2
old "Зменшує стрес на 30%"
new "Reduces stress by 30%"
# game/script/item.rpy:2
old "Можливо трохи зменшить стрес."
new "Might reduce stress slightly."
# game/script/item.rpy:2
old "Пом'ята й стара. Здається, її ще можна використати."
new "Old and crumpled. Looks like it still can be used."
# game/script/item.rpy:2
old "Від одної думки про те що це опинеться у роті нудить."
new "Just a thought about putting it in the mouth is sickening."
The only way I have now is to create a separate dictionary for another language, but I would like to find a more convenient option.
Last edited by K_strum on Sun Jan 07, 2024 4:30 am, edited 1 time in total.
How do you display your text?
It should be something like: text items_db['sigarett']['name'] or similar. If you are using text interpolation, you need to mark interpolated data as needing translation:
Ocelot wrote: ↑Sat Jan 06, 2024 2:07 pm
How do you display your text?
It should be something like: text items_db['sigarett']['name'] or similar. If you are using text interpolation, you need to mark interpolated data as needing translation: