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