MOO-cows Mailing List Archive

[Prev][Next][Index][Thread]

Re: Support for alt. language



@verb $code_utils:message tnt rx
@program $code_utils:message
what = args[1];
mesg = args[2];
language = args[3];
if (language == "English")
  messagename = mesg+"_eng_msg";
elseif (language == "Spanish")
  messagename = mesg+"_spa_msg";
elseif (language == "German")
  messagename = mesg+"_ger_msg";
else
  messagename = mesg+"_alt_msg";
endif
message = (msg = what:(messagename)() ? msg | what.(messagename));
return message;
.

This may be what you're thinking of.  I just whipped it up right now, so 
it may have a dumb parse error in it somewhere.  It's the general idea 
though.  Instead of verbs referencing messages directly with 
(this.somthing_msg), it calls $code_utils:message(this, "something", 
"spanish") to get the spanish version of the message.

Phantom


References:

Home | Subject Index | Thread Index