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