gurbalib
gurbalib copied to clipboard
Mudlib localization
Hello,
Is it possible to localize the mudlib? I think that commands should be easy to port, but there are other things like exit names.
I plan to do a localize daemon to take messages, format them with parameters (from mappings) and if the localized version is not present write a file close to the code file containing messages to be localized.
Any ideas?
It's possible, but would take a bit of work. There are some scraps that you could possibly modify to serve your needs.
There is a fake language system, look at gurbalib/lib/daemons/language_d.c gurbalib/lib/std/modules/languages/catfolk.c and gurbalib/lib/std/modules/m_language.c
There is also a parser for color codes: gurbalib/lib/daemons/ansi_d.c You'll also probably want to look at gurbalib/lib/std/modules/m_messages.c and grep around to see how those functions are used. Finally you'll want to look at: lib/modules/m_connection.c specifically the send_message function.
It would be a lot of work and since lpmuds are so heavily tied to the programming I don't see the value personally but you could go with it and see where you get if you are interested. You may also want to check out the phantasmal mudlib it does have localization built into it and you may get better mileage starting there. :)