[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: Translation System



On Fri, 07 Jan 2005 17:44:00 +0000
Jens Granseuer <jensgr@xxxxxxx> wrote:

> That said I did think about using gettext when I started with the
> localisation effort. The reason I chose not to use it in the end were
> 
> - I wasn't sure about the availability on other OSes (ok, so this
>   isn't really a point against gettext in itself)

Gettext comes in different forms. It might be built-in libc on some
systems or there is a dynamic library available or, if gettext is not
natively supported by the system, it could be integrated as static
library into the source distribution. The GNU autotools are able to
find out which case matches and configure the package accordingly.
I think gettext support for different systems is not a problem.

> - most of the stuff that needs to be translated is not in the crimson
>   executable itself but in the data files (units and missions). I didn't
>   know if gettext can handle that (I still don't) but even if it can I
>   like the simplicity of having _one_ mission file and _one_ unit set
>   instead of one file plus x files with the corresponding translations

Yes, gettext is able to handle language files for the main program, the
units and the missions. But as you already mentioned gettext has one
handicap: It uses an extra file for each language. On one side this simplifies
the maintanance but on the other hand we got a lot of files.

> Do you know gettext well? Do you think using gettext would have
> provided any other substantial gains for CF?

I use gettext for a while in my own projects and up to now I'm very
confident with it. Translation of different languages is a difficult thing and a
lot of things have to be considered. You only have to think for plural forms.
In english there are two plural forms, same in german but polish has 7
plural forms. Gettext is able to handle this.

Another point that might CF benifit from is 'charset conversion'. Gettext is
able to transparently transform strings between different charsets
(UTF-8, ISO-8859-1, CP 1252, etc). The language files could be written with
any codeset and CF got always UTF-8 strings.

I think I will have a look on how translations work in CF and how gettext
could do the job. Maybe there is a sollution for your 'one mission file' and
'one unit set file' requirement.

  Best regards
   Matthias