Changes between Initial Version and Version 1 of ZOOTranslation


Ignore:
Timestamp:
Sep 29, 2010, 2:03:24 PM (14 years ago)
Author:
djay
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ZOOTranslation

    v1 v1  
     1= ZOO Translation page =
     2
     3You'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.
     4
     5== Method to get your zcfg translated ==
     6
     7First, use the following commands from your Services Provider directory to extract all translatable messages from your ZCFG files :
     8
     9{{{
     10#!sh
     11for j in cgi-env/*zcfg ;
     12  do
     13    for i in Title Abstract;
     14     do
     15      grep $i $j | sed "s:$i = :_(\":g;s:$:\"):g" ;
     16     done;
     17 done > locale/.cache/my_service_string_to_translate.c
     18}}}
     19
     20Now, produce the messages.po file based on the produced file and the Services Provider source code using the following command :
     21
     22{{{
     23#!sh
     24xgettext service.c locale/.cache/my_service_string_to_translate.c -o message.po -p locale/po/ -k_
     25}}}
     26
     27Once 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 :
     28
     29{{{
     30#!sh
     31cd locale/po/
     32msginit -i messages.po -o fr_FR.utf8 -l fr
     33}}}
     34
     35Once the fr_FR.utf8 file exists, you can produce and install the corresponding mo file using the following command :
     36
     37{{{
     38#!sh
     39msgfmt locale/po/fr_FR.utf8 -o /usr/share/locale/fr/zoo-services.mo
     40}}}
     41
     42Now, 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]

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