[Scummvm-devel] Proposal for translation

Jordi Vilalta jvprat at gmail.com
Fri Jun 15 13:25:30 CEST 2007


Hello,

I've been thinking about making ScummVM localizable. I remember seeing
a discussion about it here:
http://forums.scummvm.org/viewtopic.php?t=3734 but maybe I missed some
other threads or sources of information.

There are two big fronts here: the internal messages translation and
the way to show them.

As I understand it, it seems the current GUI implementation isn't
capable of showing different character sets, so it would need work on
the font rendering code to be able to show any translated text. It
would probably need to integrate freetype or something like that
(while allowing better looking fonts with antialiasing and being able
to show internationalized game names and file paths).

I have no idea about font rendering, so what I'm really asking here is
someone who could work on this stuff, or at least someone who could
guide me with this when I got to step on this.

For the messages translation I got some basic ideas. I've been
thinking on using the gettext system as a base. It's very wide spread
and well tested in open source projects. It handles character set
conversions, and uses the widely known .po file format for
translations. It would help a lot the translators since they probably
are familiar with translating .po files.

The gettext library could also be linked statically, but it would
still need the external translation files.

For embedded systems, I've found a tool that may be useful:
http://www.triptico.com/software/po2c.html
It would allow to create a C file which contains all the translations,
needing no external files at runtime and giving a similar api to
gettext.

po2c is much simpler than gettext, and it doesn't handle character set
conversions. I think this issue could be fixed if we told all the
translators to use a common character set for their translations. I
propose working always with utf-8, because I think it contains all the
characters and it's backwards compatible with ascii. (This would also
apply to the font rendering stuff).

So my idea is to implement the translation system as two different
backends, one based on gettext, for desktop usage, and another one
based on the po2c conversion for limited systems, so it could be
chosen for each platform.

This is all for now. I know I'm a bit biased towards gettext and
utf-8, but it's the best I know for these purposes. Please let me know
about your opinions and correct me if I'm wrong with something.

Regards,

Jordi Vilalta




More information about the Scummvm-devel mailing list