Darkvater@5659: STRGEN USAGE Darkvater@5659: ------------ Darkvater@5659: This guide is only interesting for people who want to alter something Darkvater@5659: themselves without access to WT2 (translator2.openttd.org). Please note that Darkvater@5659: your compiled language file will only be compatible with the OpenTTD version Darkvater@5659: you have downloaded english.txt, the master language file, for. While this is Darkvater@5659: not always true, namely when changes in the code have not touched language Darkvater@5659: files, your safest bet is to assume this 'limitation'. Darkvater@5659: As a first step you need to compile strgen. This is as easy as typing Darkvater@5659: 'make strgen'. You can also download a precompiled binary from a release, Darkvater@5659: nightly, etc. Darkvater@5659: strgen takes as argument a txt file and translates it to a lng file, allowing Darkvater@5659: it to be used inside OpenTTD. strgen needs the master language file Darkvater@5659: english.txt to work. Below are some examples of strgen usage. truelight@0: Darkvater@5659: EXAMPLES Darkvater@5659: -------- truelight@0: Example 1: truelight@0: if you are in the root of your working copy (svn code), you should type Darkvater@5659: strgen/strgen -s lang lang/english.txt Darkvater@5659: to compile englist.txt into english.lng. It will be placed in the lang dir truelight@0: truelight@0: Example 2: Darkvater@5659: you only have the strgen executable (no working copy) and you want to compile Darkvater@5659: a txt file in the same directory. You should type truelight@0: ./strgen english.txt Darkvater@5659: and you will get and english.lng in the same dir truelight@0: Darkvater@5659: Example 3: Darkvater@5659: you have strgen somewhere, english.txt in /usr/openttd/lang and you want the Darkvater@5659: resulting language file to go to /tmp. Use Darkvater@5659: ./strgen -s /usr/openttd/lang -d /tmp english.txt truelight@0: Darkvater@5659: You can interchange english.txt to whichever language you want to generate a Darkvater@5659: .lng file for. truelight@0: Darkvater@5659: STRGEN COMMAND SWITCHES Darkvater@5659: ----------------------- Darkvater@5659: -v | --version Darkvater@5659: strgen will tell what svn revision it was last modified Darkvater@5659: Darkvater@5659: -t | --todo Darkvater@5659: strgen will add to any untranslated/missing strings and use the english Darkvater@5659: strings while compiling the language file Darkvater@5659: Darkvater@5659: -w | --warning Darkvater@5659: strgen will print any missing strings or wrongly translated (bad format) Darkvater@5659: to standard error output(stderr) Darkvater@5659: Darkvater@5659: -h | --help | -? Darkvater@5659: Print out a summarized help message explaining these switches Darkvater@5659: Darkvater@5659: -s | --source_dir Darkvater@5659: strgen will search for the master file english.txt in the directory specified Darkvater@5659: by this switch instead of the current directory Darkvater@5659: Darkvater@5659: -d | --dest_dir Darkvater@5659: strgen will put .lng in the directory specified by this switch; if Darkvater@5659: no dest_dir is given, output is the same as source_dir