We discover a built-in language variable for slightly more consistent in-game language change and show off a little bit of Red Embrace’s Russian localization progress.


Changing lang

Last post, we discussed some of the work required to do a complete localization (and not just text translation) of Your Dry Delight. In one of the code blocks, you could see the variable lang. Code snippet copy pasted below for recollection.

# use this for the French options screen
if lang == "_fr":
    imagemap:
        ground "gui/pref_idle.png"
        idle "gui/pref_idle.png"
        hover "gui/pref_hover.png"
        selected_idle "gui/pref_hover.png"

        hotspot (285,150,120,48) action Preference("skip", "seen") focus_mask None
        hotspot (467,150,131,48) action Preference("skip", "all") focus_mask None

We originally introduced that variable because we wanted to have an easy way to check which language was active and assign language-specific actions (e.g. use the French Main Menu image if the game is in French).

Now, for whatever reason, the lang variable is not changing correctly when players flip between languages. After digging through the Ren’Py documentation some more, a built-in variable that does the same thing was unearthed: _preferences.language. It functions exactly the same way that we want lang to function, so we can do a simple find-replace across all our files to convert if lang == "_fr":if _preferences.language == "french", and et voilà the code is behaving a bit more as expected.

Red Embrace Russian TL sneak peek

A while back, we mentioned something about Red Embrace also receiving a localization. Here’s a little teaser of how it’s going!

Extras page with character profiles
Luka's in-game character profile

French

First choice when meeting Dominic