I'm writing a game that is mainly geared for GNU/Linux and Mac OS X systems, but I've been keeping things fairly portable in most of my code.
I've ported nearly all of the OS-specific stuff to Windows; the only thing remaining is i18n.
My question is this
How am I supposed to use Win32's
setlocale()
function along with gettext?
Until now, I've been using ISO 638/ISO 3166 codes (ex. de_DE.utf8
), but these don't seem to work on Windows.
I've tried setlocale(LC_ALL, "German"), which succeeds, but gettext can't find the translated strings correctly, even after using bindtextdomain.
Any hints? I'd like to stick with GNU gettext to avoid rewriting heaps of code.