PHost - Languages

Want to Help?


All the messages PHost displays while it runs, including sub-space messages sent to players, are taken from a file plang.hst. Here you find the source code to that file. If anyone feels like updating a language file, go ahead and send it to me.

Files

fileContentLast major modification by:
dutch.dbDutchPieter van der Eems
english.dbEnglishStefan Reuther
estonian.dbEstonianmaybe you?
french.dbFrenchBrivido
german.dbGermanStefan Reuther
italian.dbItalianoBrivido
lang.dbMain file(not applicable)
nenglish.dbNew EnglishStefan Reuther
polish.dbPolishPiotr Winiarczyk
russian.dbRussianEvgeny Larionov
spanish.dbSpanishJorge Sánchez

Polish is Piotr Winiarczyk's new Polish translation. NewEnglish is "English without Tim-compatibility quirks". Both are available in PHost 3.4c and later. See the language command for more information about the languages.

The files are current as of PHost 4.1e.

Instructions

  • "lang.db" contains some hints - read them. There are "position-dependant" parameters (=printf strings); here, translations must match exactly. Subspace messages have "position-independant" parameters (="@n%t" with n being a number and t a type)
  • PHost is played on Unix and DOS. If at all possible, screen messages (host.log) should be readable on both. For example, for German, the umlauts ("ä") have different codes in DOS and Unix, so we use the latin transcriptions ("ae"). This isn't possible for things like Russian, though.
  • Subspace messages should not exceed the 40x21 limit when expanded. Note that a @1%S (ship name) expands to up to 20 characters, a @1%H (hull) expands to 30.
  • When you make a new language: pick a character set for subspace messages and use that. Document it in the "notes for translators". For example, Russian uses the "cp866" = "alt" character set which is DOS specific. Thus it will work in VPA but not in Winplan. Life's tough.
  • If you have problems, don't hesitate to ask.

There is not yet a standalone language compiler (although since PHost 4.1, this at least is technically possible which it wasn't before), so you cannot test your modifications yourself. Sorry. My survey on the phostdev mailing list didn't yield overwhelming interest, though. But if you want it, go ahead and say so!

Position-independant parameters

CodeMeaningYieldsRepresentation
ARace adjectiveup to 12 chars 16-bit 1..RACE_NR
CCargo type string ("^_ Neutronium")16-bit index (CargoType_Def)
HHull name up to 30 chars 16-bit 1..HULL_NR
PPlanet name up to 20 chars 16-bit 1..PLANET_NR
SShip name up to 20 chars 16-bit 1..SHIP_NR
UId number 3 chars ("001".."999") 16-bit
VRace code one character ("0-9ab") 16-bit 1..RACE_NR
X32-bit hex 8 characters 32-bit
IIon storm nameup to 20 chars 16-bit 1..50
cCharacter one character character
l32-bit decimaldecimal number 32-bit
sString whatever string
u16-bit decimaldecimal number 16-bit

Placeholders with the same representation can be exchanged. If the existing string has "Planet: @1%P", you know that parameter 1 is a 16-bit planet Id and you can add, for example, "(Id: @1%u)", because %u can also be used to show 16-bit numbers. No additional stuff can be between the "%" and the code.

PHost 4.x documentation

There are a few "inofficial" translations of PHost documentation fragments floating around. The problem is that most of them are out-of-date. The German documentation presented on this site is generated using an (experimental) fragment translation system from the English one (based on the same ideas as program localization using gettext). This makes it easy to identify sections that need to be updated, and has an automatic fallback to the English original (instead of shipping obsolete translated text). This makes it easy to update the translation.

If you're interested in using that to provide a documentation in your language, mail me. Note that starting anew is a lot of work, though; the current base file is about one megabyte with over 5500 fragments.


Mail support@phost.de for support, ideas, bug reports, questions. Contact Details