Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Christoph_Berg on June 25, 2002, 01:40:34 pm

Title: Translation in other languages
Post by: Christoph_Berg on June 25, 2002, 01:40:34 pm
Would it be possible to simplify the translation in other languages? Because now FreeSpace 2 uses two tables
strings.tbl and tstrings.tbl to translate FreeSpace in the other languages and it is very hard to translate mods into other languages.
Title: Translation in other languages
Post by: Inquisitor on July 02, 2002, 02:21:11 pm
There is someone who's actively working on a japanese port, but they have not come "into the fold" as it were. Not sure if they are attacking the TBL's directly or possibly working on a mechanism that can be apploed to other ports.
Title: Translation in other languages
Post by: Christoph_Berg on July 04, 2002, 08:05:23 am
The problem is that if somone makes a new modification or campaign and adds something to the ship/weapons database, it is not possible to translate it into German or other languages.

It is possible to translate the mission files that come with a campaign directly, but that it is not so useful.

Both tables are working the same way:

#English
0, "The main FreeSpace 2 campaign."
.
.
.
#end

#German
0, "Der Hauptfeldzug von FreeSpace 2"
.
.
.
#end


But the number of strings is limited by localize.cpp in the FreeSpace Source Code and so a translater must always change this number. Is it possible to change it?
Title: Translation in other languages
Post by: penguin on July 04, 2002, 03:55:43 pm
In response to the previous post, in order to translate a user-made mission or campaign, you would first need to change all the XSTR("...", -1) to use a unique value (other than -1), then add the translated text to the tstrings.tbl table (making sure you don't blow the upper limit on the table size...)

Ideally, all of the text strings in a mission would have XSTRs which could be translated into any language.  But when FRED generates any XSTRs they all have an ID of -1.

It would be nice to extend it so that any text strings in user-generated missions (as well as ship/weapon descriptions) have a unique identifier that could be used for translation purposes.

Currently, as we probably all know, there are two tables for international text:One way we could (maybe) do it would be to reserve ranges of values for the XSTRs in tstrings.tbl:That way the string being generated by mission designers wouldn't collide with those used by ship & weapons modders.

Also, the number of strings and number of languages is (I think) hardcoded somewhere, it would be nice to relax this somewhat and allow an arbitrary number of strings and languages.  This would of course require source code changes, both to Freespace and to FRED.

... just some random thoughts, open for feedback