PDA

View Full Version : I18n (Internationalisation)


Ravu al Hemio
2nd Jun 2005, 01:10 PM
Hello UTXMP developers and community,

I am new to UTXMP even though I do hang around in the BU forums from time to time. First, I would like to thank Free Monkey for reviving U2XMP in such high quality -- well done there! I somehow prefer it over Onslaught, since it has more items and more tactics.

I decided to have a go at a German translation (ucc dumpint being a loyal friend), and I am far enough. Unfortunately, some of the strings are forced-English. An example is XMP.XMPHackTrigger. GetDescription is simply full of hardcoded English strings. A suggested fix:

// Declaration area, modify line 33 (Beta1a code):
var() localized string Description;

// Add (into new section delimited by '======='?)
var localized string HackingOwned, HackingStatusPre, HackingStatusPost;

// Modify GetDescription like so:
simulated function string GetDescription( Controller User )
{
local string Str;

if( bUsable )
{
if( Description != "" )
Str = Description $ ":";

if( User.GetTeamNum() == Team )
Str = Str @ HackingOwned;
else
Str = Str @ HackingStatusPre @ GetTeamProgress(User) * 100.0 $ HackingStatusPost;
}

return Str;
}

// Add to DefaultProperties:
HackingOwned="Owned"
HackingStatusPre="Hack:"
HackingStatusPost="%"

(Even though the box says it, it ain't PHP code. But colour-coding makes it more readable, doesn't it?)

Another problem are the HUD image file strings (e.g. Player Score), since they can't be translated without more playing around. I opt for a conversion of these characters into a font and writing out the HUD strings manually.

I might add to this thread later on.

Keep up the good work!

Dandeloreon1984
2nd Jun 2005, 03:44 PM
i dunno... english is rather easy to pick up... i personally don't care about internationalization, but if it has to be done, why not... umm... does the internationalization automatically convert text to the appropriate word in the other language?


can you go ahead and please show samples of the following as internationalized on ut2k4, considering you said it can be done?
1: Hello, and welcome to utxmp.
2: XMP Garden originally appeared in the demo for unreal 2 expanded multiplayer edition.
3: Red ranger said "I've got an Artifact"

IndianPsycho
2nd Jun 2005, 11:09 PM
Sure.

Ravu al Hemio
3rd Jun 2005, 12:57 AM
does the internationalization automatically convert text to the appropriate word in the other language?

Nope, that should be done by translators. Of course you can run the text through a translator software like Babelfish, but then it will look like if it were written in Babelfish. ;)

can you go ahead and please show samples of the following as internationalized on ut2k4, considering you said it can be done?

It all depends on the strings used in the software. If any string in the code has the modifier "localized" set during its declaration, the engine looks into the files suffixed by the setting "Language" in section [Engine.Engine]. This is, by default, set to "int" ("International Language", English), but can be set to "det" for German, "itt" for Italian, "est" for Spanish, "kot" for Korean, "cst" for Czech, etc. Then, the engine doesn't check the .int files but instead reads the strings from .det files.

What do you want me to show exactly? Screenshots or the string file?

Sure.
If that means you fixed it up for me (and any other translators), thanks.

Oakwind
3rd Jun 2005, 04:21 PM
Great idea man, the more peeps the better. And if they don't do it ,it can always be modded in.

_Lynx
4th Jun 2005, 07:38 PM
Than, I guess, I'll be able to make a russian translation =)

gnarkft
6th Jun 2005, 04:13 AM
Geh, I might even make a dutch version =]