Scripts
[ class tree: Scripts ] [ index: Scripts ] [ all elements ]

Procedural File: po2mo.php

Source Location: /scripts/po2mo.php



Page Details:

po2mo.php - compile all PO files

Usage: ./po2mo.php




Tags:

author:  Yves Bolognini <yves.bolognini@camptocamp.com>


Includes:

require_once(CARTOCOMMON_HOME.'common/ProjectHandler.php') [line 27]
Project handler class for constants

require_once(CARTOCLIENT_HOME.'client/Internationalization.php') [line 22]
require_once('./pot_tools.php') [line 20]





CARTOCLIENT_LOCALEDIR [line 18]

CARTOCLIENT_LOCALEDIR = CARTOCLIENT_HOME.'locale/'

[ Top ]




compile [line 219]

boolean compile( string $project, string $fileName)

Compiles PO files into MO



Tags:

return:  true if OK


Parameters

string   $project  
string   $fileName  
[ Top ]



getLocales [line 34]

array getLocales( string $project)

Finds locales by looking for my_project.lang.po files



Parameters

string   $project  
[ Top ]



getMapIds [line 251]

array getMapIds( string $project)

Gets list of map Ids by reading project directory



Parameters

string   $project  
[ Top ]



getMapPo [line 59]

string getMapPo( string $project, [string $mapId = null])

Retrieves PO from server

If not in direct mode, will retrieve file using CURL. This needs CURL to be installed in PHP environment.




Tags:

return:  retrieved file name


Parameters

string   $project  
string   $mapId  
[ Top ]



merge [line 147]

boolean merge( string $project, string $file1, string $file2, string $output)

Merges two PO files

Writes out all messages of first file, then writes out messages from second file if not present in first one.




Tags:

return:  true if OK


Parameters

string   $project  
string   $file1  
string   $file2  
string   $output  
[ Top ]



Documentation generated on Wed, 6 Apr 2005 12:06:50 +0200 by phpDocumentor 1.3.0RC3