| 1 | ============================================================================ |
|---|
| 2 | Internationalization in PennMUSH |
|---|
| 3 | ============================================================================ |
|---|
| 4 | |
|---|
| 5 | PennMUSH 1.7.3 and later have extensive support for running in non-English |
|---|
| 6 | environments. There are two parts to this. First, what the mush considers |
|---|
| 7 | to be valid characters, what's upper-case, what's lower-case, how they |
|---|
| 8 | are sorted, and so on. The second is translating the messages produced |
|---|
| 9 | by the game into another language. (Helpfiles aren't currently translated.) |
|---|
| 10 | |
|---|
| 11 | Several languages are currently supported to one degree or another. |
|---|
| 12 | If your favorite language isn't (or if you want to increase the |
|---|
| 13 | level of support), and you're fluent in it, you can help out! |
|---|
| 14 | See http://www.pennmush.org/translation.html. |
|---|
| 15 | |
|---|
| 16 | Localization (the process of making a MUSH conform to a given "locale") |
|---|
| 17 | is controlled by the LANG or LC_ALL environment variables, which have |
|---|
| 18 | the form "la_DI", where la is a language code and DI is a dialect. For |
|---|
| 19 | example, "en_US" stands for English, United States dialect. The |
|---|
| 20 | language codes are usually the same as a country's top level domain in |
|---|
| 21 | URLs. Spanish is 'es', Russian is 'ru', and so on. |
|---|
| 22 | |
|---|
| 23 | There are two places where you have to use LANG: when you're |
|---|
| 24 | compiling the MUSH (in order to compile the message translation files) |
|---|
| 25 | and when you start up the MUSH (in order to set the locale for |
|---|
| 26 | the running server). |
|---|
| 27 | |
|---|
| 28 | 1. Compiling the MUSH - tips |
|---|
| 29 | |
|---|
| 30 | Files with translated messages are located at |
|---|
| 31 | http://download.pennmush.org/Source/translations/. Get the one for your |
|---|
| 32 | patchlevel and language, put it in your pennmush/po/ directory. |
|---|
| 33 | |
|---|
| 34 | These files have to be compiled to an efficient internal form before |
|---|
| 35 | starting up the mush. This means you should set your LANG environment |
|---|
| 36 | variable before you compile your server. |
|---|
| 37 | |
|---|
| 38 | To do this using the common bash shell, 'export LANG=en_US', or whatever |
|---|
| 39 | your setting is. If that gives an error, try the tcsh shell form 'setenv |
|---|
| 40 | LANG en_US'. If that still doesn't work, consult the documentation for |
|---|
| 41 | the shell you're using. |
|---|
| 42 | |
|---|
| 43 | The message files are compiled during the "make install" step. |
|---|
| 44 | |
|---|
| 45 | Be sure that you compile with a COMPRESSION_TYPE (in options.h) that |
|---|
| 46 | is 8-bit clean so it will work properly with non-ASCII characters. |
|---|
| 47 | |
|---|
| 48 | 2. Starting up the MUSH - tips |
|---|
| 49 | |
|---|
| 50 | The LANG environment variable that controls what language the mush |
|---|
| 51 | uses is normally set in the pennmush/game/restart script. There's an |
|---|
| 52 | example for using French in the script already that can be used as a |
|---|
| 53 | starting point. |
|---|
| 54 | |
|---|
| 55 | Your server account might be set up with a non-english language as the |
|---|
| 56 | default. If so, and you don't set LANG in the restart script, that |
|---|
| 57 | default language will be used. |
|---|