On Fri, 25 Jan 2008 18:32:00 +0100, Kent Paul Dolan <xanthian RemoveThis @well.com>
wrote:
> There's a good argument for shredding out NetHack's
> language-based interaction code into a
> professional-style internationalized mechanism,
> (which I do _not_ know how to do, but have watched
> being done, the problem has a by now well known
> solution), which would be very different code from
> the existing rat's nest of "?:" switching, creating
> the needed executable build/makefile mechanisms to
> accommodate locale switches at build time, and
> merging each new localization into the existing
> NetHack code base as an added dataset/codeset,
> rather than splintering NetHack into incompatible
> code trees as is now happening.
>
> That way new releases could be offered ongoing to
> the translation team, and a next release be entirely
> internationalized from the start.
That would be nice, and probably good for the program,
but not easy. At best, some of the ?: operators, like
the checks for "you're blind" and "you're hallucinating",
may come up often enough
that it would be worth creating some mechanism to
handle them systematically. But on the whole you'll
have to move all of those pick-your-choice operatoins
up above the output statements, and be left with a
great big table of complete variations on the output
string just for one statement of program code.
It may be an advantage that the strings themselves will
then be fairly readable, having only one or two %s
placeholders for a monster and/or an object. On
the other hand, however, the strings will all have to
be referenced by self-explanatory names
in order to keep the source code human-readable.
And speaking of %s placeholders, the
internationalization should also insert an abstract
"morph-a-(noun, verb, adjective, ...)-for-this-
particular-usage" layer. The morphological
transformations necessary will not only be different
for every language, but will also require
different kinds of information from the calling function,
so plugging in different languages still won't be
super-simple.
Tony
--
When we dance around drunk in our underwear,
we don't ask ourselves any questions.
--Sawaki Kōdō roshi
>> Stay informed about: Now in German | NetHack auf deutsch