2 Last updated: 2009-06-30
3 ------------------------------------------------------------------------
10 * 1.2) strgen command switches
15 This guide is only interesting for people who want to alter something
16 themselves without access to translator.openttd.org. Please note that
17 your compiled language file will only be compatible with the OpenTTD version
18 you have downloaded english.txt, the master language file, for. While this is
19 not always true, namely when changes in the code have not touched language
20 files, your safest bet is to assume this 'limitation'.
21 As a first step you need to compile strgen. This is as easy as typing
22 'make strgen'. You can download the precompile strgen from:
23 http://www.openttd.org/download-strgen
25 strgen takes as argument a txt file and translates it to a lng file, allowing
26 it to be used inside OpenTTD. strgen needs the master language file
27 english.txt to work. Below are some examples of strgen usage.
32 if you are in the root of your working copy (git repository), you should type
33 strgen/strgen -s lang lang/english.txt
34 to compile englist.txt into english.lng. It will be placed in the lang dir
37 you only have the strgen executable (no working copy) and you want to compile
38 a txt file in the same directory. You should type
40 and you will get and english.lng in the same dir
43 you have strgen somewhere, english.txt in /usr/openttd/lang and you want the
44 resulting language file to go to /tmp. Use
45 ./strgen -s /usr/openttd/lang -d /tmp english.txt
47 You can interchange english.txt to whichever language you want to generate a
50 1.2) strgen command switches
51 ---- -----------------------
53 strgen will tell what git revision it was last modified
56 strgen will add <TODO> to any untranslated/missing strings and use the english
57 strings while compiling the language file
60 strgen will print any missing strings or wrongly translated (bad format)
61 to standard error output(stderr)
64 Print out a summarized help message explaining these switches
67 strgen will search for the master file english.txt in the directory specified
68 by this switch instead of the current directory
71 strgen will put <language>.lng in the directory specified by this switch; if
72 no dest_dir is given, output is the same as source_dir