open-manifold / Open-Manifold

A free and open-source clone of Rhythm 'n' Face for PC.
Other
9 stars 1 forks source link

Internationalization (I18N) Support #5

Open SuperFromND opened 1 year ago

SuperFromND commented 1 year ago

It'd be really nice to have the option to support languages other than English (particularly Japanese, since Rhythm 'n' Face was a Japan-only release).

This would probably require an overhaul of how the game handles text. Right now, the text system (draw_text()) is only really equipped to handle English and other Latin-alphabet languages (Spanish, French, etc.), and in-game strings are hard-coded into the game itself. The latter could be solved fairly easily using either a JSON file or possibly an INI with all the required strings, something like:

[en-US]
menu.game = Play
menu.sandbox = Sandbox
menu.options = Options
menu.exit = Exit

...

[en-ES]
menu.game = Jugar
menu.sandbox = Salvadera
menu.options = Opciones
menu.exit = Salida

SDL2 actually does have a library designed for TTF font and text-drawing, so swapping out draw_text() with this library should allow for non-Latin languages to be supported. Whether or not it supports everything draw_text() does (namely color multiplication and squishing text horizontally), I'm not sure.

xen-0sd commented 1 year ago

The menus wouldn't need to be changed much in Japanese. Their players are already familiar with and have come to expect videogame buttons such as "Play" and "Exit" and "Inventory" to be in English. You'll see this if you look at the original Rhythm 'n' Face or any arcade game.

On the other hand, "Sandbox" might need to be something like フリープレイ and "Options" could be オプション. We'd have to get someone like Chia or Sean for the tutorial, which didn't exist at the time this issue was opened.