Version 1 (modified by djay, 9 years ago)


ZOO Translation page

You'll find here informations about how the ZOO Kernel use the gettext technology to translate on the fly both ZOO Kernel internal messages and also ZOO Services Provider internal messages and zcfg content.

Method to get your zcfg translated

First, use the following commands from your Services Provider directory to extract all translatable messages from your ZCFG files :

for j in cgi-env/*zcfg ; 
    for i in Title Abstract; 
      grep $i $j | sed "s:$i = :_(\":g;s:$:\"):g" ;
 done > locale/.cache/my_service_string_to_translate.c

Now, produce the messages.po file based on the produced file and the Services Provider source code using the following command :

xgettext service.c locale/.cache/my_service_string_to_translate.c -o message.po -p locale/po/ -k_

Once you get the messages.po file, use the following command to create the po file for the language you want to translate into, let suppose that french language was choosen here :

cd locale/po/
msginit -i messages.po -o fr_FR.utf8 -l fr

Once the fr_FR.utf8 file exists, you can produce and install the corresponding mo file using the following command :

msgfmt locale/po/fr_FR.utf8 -o /usr/share/locale/fr/

Now, to test if your Services Provider ZCFG and internal messages are well translatable by the ZOO Kernel, please add the language argument to you request, for instance : for the following url http://youserver/cgi-bin/zoo_loader.cgi?request=GetCapabilities&service=WPS use now this one http://youserver/cgi-bin/zoo_loader.cgi?request=GetCapabilities&service=WPS&language=fr_FR


Context Navigation

ZOO Sponsors

Become a sponsor !

Knowledge partners

Become a knowledge partner

Related links