README.po2i18n
branchtrunk
changeset 23 3c10fdd8ccce
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/README.po2i18n	Mon Jan 28 17:39:51 2008 +0100
     1.3 @@ -0,0 +1,44 @@
     1.4 +        
     1.5 +                  po2i18n - Converter for po files
     1.6 +
     1.7 +
     1.8 +Written by:              Udo Richter <udo_richter@gmx.de>
     1.9 +Project's homepage:      http://www.udo-richter.de/vdr/scripts.html#po2i18n
    1.10 +                         http://www.udo-richter.de/vdr/scripts.en.html#po2i18n
    1.11 +
    1.12 +
    1.13 +
    1.14 +About
    1.15 +--------------------------------------------------------------------------
    1.16 +po2i18n is a perl script that generates an i18n.c file compatible to the i18n
    1.17 +system of VDR 1.2.0 - VDR 1.5.6, based on the .po files of VDR 1.5.7. This
    1.18 +allows plugins to transit to the translation system of VDR 1.5.7 while 
    1.19 +maintaining compatibility to earlier versions. The script can be used manually
    1.20 +or automatically as part of the Makefile.
    1.21 +
    1.22 +
    1.23 +Use
    1.24 +--------------------------------------------------------------------------
    1.25 +po2i18n.pl is a filter and can be used manually like this:
    1.26 +
    1.27 +  ./po2i18n.pl < i18n-template.c > i18n.c
    1.28 +  
    1.29 +The filter reads all relevant ./po/*.po files and writes the i18n strings
    1.30 +into the template file. Strings will be added between the following two lines:
    1.31 +
    1.32 +  // START I18N
    1.33 +  // END I18N
    1.34 +
    1.35 +See also the sample i18n.h and i18n-template.c file. Note that the phrases data
    1.36 +structure is encapsulated in #if VDRVERSNUM < 10507, so the i18n strings won't 
    1.37 +be in the plugin file after 1.5.7. The call to RegisterI18n() of your plugin 
    1.38 +should also be encapsulated like this.
    1.39 +
    1.40 +po2i18n can also generate the i18n.c file on the fly while compiling. The 
    1.41 +changes to the Makefile are demonstrated by the included Makefile.diff sample.
    1.42 +With these changes, the i18n.c file will be generated on VDR up to 1.5.6, and
    1.43 +the whole gettext conversion is skipped. From 1.5.7 on, the i18n-template.c 
    1.44 +file will be simply copied as a dummy, and the new locale system will run.
    1.45 +
    1.46 +As a drawback, the automatic .dependencies for i18n.c won't work.
    1.47 +