[freespace2] support for polish version of freespace 2

Taylor Richards mtrs at bellsouth.net
Wed Mar 5 11:45:47 EST 2003


On Mon, 2003-03-03 at 17:22, Bradley Bell wrote:
> Quoting Taylor Richards <mtrs at bellsouth.net>:
> 
> > It's when it tries to parse the strings.tbl in localize.cpp (had this
> > problem with FS1 at one time) it looks for the particular language.  It
> > will search for the default (English/default) which may not exist in
> > this particular table and will crash if the language is not specifically
> > set in the ini file.  The German version will use German as default if
> > the option does not exist.  Without looking at the table I'm guessing
> > that it's layout is to blame.
> 
> I know it's sorta kludgey, but you could just check the md5sum, or the file size
> of strings.tbl, or another file, and select the language based on that.  I know
> there are a lot of versions to check against, but I don't think it would be an
> excessive amount.  And it can always fall back on the compiled-in default or the
> .ini setting.  But at least for most end-users, it would just be "automagic".

Here is kind of a proof-of-concept for a way it could be handled.  I did
this pretty quickly so anything that may cause a problem I probably know
about, but feel free to make sure that I know.  I forgot to put the
Polish patch in before doing this so sorry about that.  This patch
doesn't make Makefile changes but the GERMAN_BUILD option would be
rendered obsolete and with a couple of additional lines for selection
the Polish patch would work as is without ini or build changes.  This
would also have the benefit of a single installer/binary with support
for multiple (all we know about) languages.

I didn't realize that the built-in cmdline processing actually worked so
I just used that and put in the new options.  No auto-detection but you
can select a language from the command line.  The default is still
English and I think it's easier to keep it that way since the localize
stuff seams to expect it.  Try out "./freespace2 -help".

If we can decide on a relatively foolproof way of conjuring "automagic"
I think it could added to this pretty easily.  Although I know that it
runs and at least appears to switch languages I don't know if it works
100% as expected.  I think I can find a German tester or two who would
agree to test but I want to get this largely finalized first.  Comments,
suggestions, recipe for "automagic"?


Taylor

-- 
Taylor Richards <mtrs at bellsouth.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lang_sel.patch
Type: text/x-patch
Size: 12708 bytes
Desc: not available
URL: <http://icculus.org/pipermail/freespace2/attachments/20030305/679c0dd4/attachment.bin>


More information about the freespace2 mailing list