Translating

Posted by Baturon on Sun 02 Dec 2007 02:00 PM — 5 posts, 23,483 views.

#0
I want to translate ROM into my language.Commands,skills,battle reports(example "you misses")
and i change my title screen.How do i this? I using Rom (last version)...Thank you.
Amended on Sun 02 Dec 2007 02:04 PM by Baturon
Australia Forum Administrator #1
You can change commands by editing the commands.dat file.

You can change the welcome screen by editing one of the help files (and of course you can change the help messages).

You can change room descriptions, mob descriptions, and object descriptions by editing the area files.

As for stuff like "x misses y" that is a big, long job. You need to edit the source files, look for every string you want to translate, and replace it. I estimate there will be thousands of them.
USA #2
And not only will you have thousands of strings to translate, but also, depending on your target language, some will simply not be translatable without more work.

A simple example is:

You see the 'x'.

You might think this translates to

Vous voyez le 'x' (in French)

but actually it's more complicated... you need to change "le" depending on what 'x' is. If 'x' is a feminine noun, you need "la" instead of "le"; if it starts with a vowel (or certain consonants, in some cases) you need l' instead of "le" or "la"...

Even if you don't aim to support multiple languages, you have a lot of work ahead of you. (Frankly, though, I'm not sure supporting multiple languages is that different from having to support a single language with a relatively complex grammar, compared to English's relatively simple agreement between components of a sentence.)
#3
okay.i not found commands.dat.where is it
Australia Forum Administrator #4
Sorry, I was thinking of Smaug.

ROM has its commands hard-coded into interp.c file.

For example:


const   struct  cmd_type        cmd_table       [] =
{
    /*
     * Common movement commands.
     */
    { "north",          do_north,       POS_STANDING,    0,  LOG_NEVER, 0 },
    { "east",           do_east,        POS_STANDING,    0,  LOG_NEVER, 0 },
    { "south",          do_south,       POS_STANDING,    0,  LOG_NEVER, 0 },
    { "west",           do_west,        POS_STANDING,    0,  LOG_NEVER, 0 },
    { "up",             do_up,          POS_STANDING,    0,  LOG_NEVER, 0 },
    { "down",           do_down,        POS_STANDING,    0,  LOG_NEVER, 0 },

    /*
     * Common other commands.
     * Placed here so one and two letter abbreviations work.
     */
    { "at",             do_at,          POS_DEAD,       L6,  LOG_NORMAL, 1 },
    { "cast",           do_cast,        POS_FIGHTING,    0,  LOG_NORMAL, 1 },


You would have to change those.