Closed DynCoder closed 5 years ago
Rolling your own i18n is generally a bad idea. Many have tried, many have failed.
I would suggest looking at "GNU gettext" or something with similar functionality that's easily integratable in your particular language+toolchain.
It might be more troublesome to get started, but you'll be happy afterwards. As an added benefit, others can use existing tools to manipulate gettext po files (= create translations for you) without having to understand your particular i18n scheme.
I enjoy this part of the GNU gettext doc:
What does Woe32 mean?
“Woe32” denotes the Windows 32-bit operating systems for x86: Windows NT/2000/XP/Vista and Windows 95/98/ME. Microsoft uses the term “Win32” to denote these; this is a psychological trick in order to make everyone believe that these OSes are a “win” for the user. However, for most users and developers, they are a source of woes, which is why I call them “Woe32”.
Being more seriously: I suggest on developing a cool game first, multi-language second.
Or: after releasing the game on Steam, let's see if we are going to add this.
Wow whos that guy
Will reopen whenever
wdoekes is the father of jesperdoekes, a Team Red Cobra member.
To make our game better playable by people in (for example) France and Russia, we need a language manager.
Create a singleton thingy class (like
sfml_window_manager
) namedlanguage_manager
We create a function for ever string that has to be translated, for example:
get_play("fr")
will return "jouer" or something similar I'm not that great at french and neither is google translate. 🌱get_about("ru")
will return something Rafayel will translate for us (I hope)get_tile(tile_type::mountains, "nl")
will return "gebergte".