[freespace2] support for polish version of freespace 2

Taylor Richards mtrs at bellsouth.net
Mon Mar 3 17:50:06 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".

There is a built-in function for checksumming a file which is used to
validate ships.tbl and weapons.tbl.  It shouldn't be hard to set this up
but you would have to have the checksums for the tables.  The problem is
that the strings.tbl /could/ be the same between different language
versions as it is set up to contain all of the languages.  I believe
this (multi-language support) was one of the main reasons for moving
all/most of the strings to the tables.  This way they didn't have to
make source changes for the different versions, just use the launcher to
set the language preference.

Some other file could be used but it would mean examining the files in
every version to find one that is ok to check against.  I guess what's
needed is a little utility (or function) to generate a report of the
files in a vp and use that to find the golden file.  I never went far
enough to really think this out before.

The other option I started to consider was using the LANG variable
instead of a file.  I pretty much stopped researching and moved on to
something else at that point so I don't know if that is a better idea or
not.

I know that fs2_open (or one of the people involved, it's in cvs) has at
least the start of a launcher and maybe with some modifications we could
just use that to solve the problem.


Taylor

-- 
Taylor Richards <mtrs at bellsouth.net>




More information about the freespace2 mailing list