P18 Internationalizing Preprocessor

About

About  .  Documentation  .  License   .  Download

General

P18 is a fast and flexible file preprocessor with macro processing capabilities and special support for internationalization. It is well suited for processing arbitrary text files and creating translations to different languages. The reason I wrote this tool was because I needed to internationalize a web application written in PHP.

P18 is a macro processor, recognizing preprocessor directives (such as conditionals, macro/variable definitions, file inclusions, ...), macro/variable substitutions, and I18N (internationalization) escapes.

P18 comes with a set of tools for managing an I18N message database. P18 can be used to scan for messages, create translation template files, and merge new translations into an existing database.

Internationalization Using a Preprocessor

Internationalization of an application normally requires a message-lookup routine which is called by the application program at runtime. The basic idea of internationalization using a preprocessor is to generate a set of files from a single source file, one for each language. For a web application for example, a source file ``myfile.php'' is translated to a set of files called ``myfile.php.languageID''. Many web servers can be configured to choose the appropriate translation based on the browsers language settings. (The same trick works for static HTML files, of course.)

Status

P18 is a work in progress. The current version is usable, however some planned functionality is still missing. I am currently the only developer, and I'm busy with other projects. It may take a while until version 1.0 is reached.

License

P18 is distributed under the terms of the GNU General Public License. See topic License for details.


Sascha Demetrio
gargamel@wizard-labs.org


About  .  Documentation  .  License   .  Download