ZOO Translation page

You'll find here information 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 :

#!/bin/bash
for j in cgi-env/*zcfg ; 
  do 
    for i in Title Abstract; 
     do
      grep $i $j | sed "s:$i = :_(\":g;s:$:\"):g" ;
     done;
 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 :

#!/bin/bash
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 chosen here :

#!/bin/bash
cd locale/po/
msginit -i messages.po -o zoo_fr_FR.po -l fr

Obviously now you'll have to edit the zoo_fr_FR.po file with your favorite text editor or using one of the following tools :

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

#!/bin/bash
msgfmt locale/po/zoo_fr_FR.po -o /usr/share/locale/fr/LC_MESSAGES/zoo-services.mo

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

As many Services Provider Metadata File (zcfg) can be already translated, it can be useful to use the following command to ensure getting back all the translation for the specified language.

msgcat -o compilation.po $(find ../../ -name fr_FR.utf8.po)
msgfmt compilation.po -o /usr/share/locale/fr/LC_MESSAGES/zoo-services.mo

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png