TraducTeurk

1 The management of translations in a PHP framework

1.1 Generaly speaking

When we develop a web application in a PHP framework, we are driven to manage labels, error messages, etc... which must be translated into the tongue of the internaut if it is not the one of the implementation of the application.

There are many ways to manage this thing, the most common being:

1.2 Translations in FrameBeurk

The constitution and the maintenance of catalogs would be tedious without a tool. This is where comes out TraducTeurk...

2 TraducTeurk: The translation management tool

TraducTeurk is the Excel-VBA application that simplifies the management of the translations in FrameBeurk. It extracts the labels to translate from the source code of the PHP framework and gathers them into an Excel worksheet, sorted by module. If some translations are already available in the existing catalog files, TraducTeurk completes the worksheet with them.

After that, the developer -or the person in charge, completes the sheet with the missing translations, then requests TraducTeurk to generate the new catalog files. The last thing left to do is to copy these catalog files at the right place into the FrameBeurk tree folder, so that the translations are taken into account.

2.1 The command worksheet

Command worksheet

The command worksheet is the user interface -quite simple, of TraducTeurk. Here we fill in the sheet names where the software is to work, the parameters it has to use, the folder to use, and here we run the actions that TraducTeurk must do. Worksheets and parameters have preset default values that do not need to be modified.

2.2 The functions to look after

Functions to look after

This sheet contains the list of FrameBeurk functions (as of version 0.65) that accept as argument a label eligible to translation. For each function are defined the position of the label in the function signature and the one of the module (if the function accepts this argument). Only the arguments of string data type are selected.

The list of functions can be completed according to your needs.

2.3 The labels to translate

Labels to translate

When TraducTeurk has finished its first task, all the labels to translate are stored on this worksheet (in column B), sorted by module (column A). The translations that came across in the existing catalog files are added to the rightmost columns; the language of these labels are set in the headers of the columns.

Obsolete translations

During the browsing of the catalog files, if TraducTeurk runs into a translation that stands for a label that exists no longer in the module, it adds a line at the bottom of the list, on a red background.

In the example above, a PHP function using the label "Style" formerly declared in module Zenpa has been moved to module Kom1. Therefore we can see that the label "Style" has no translation yet in module Kom1 while the translation into en_US : "Style" has no reason left to exist.

2.4 The scanned folder tree

Scanned folder tree

No real need for this sheet... it can sometimes help to have the list of his project files in Excel !

2.5 The analysed code

Analysed code

Mainly for debugging reasons, TraducTeurk writes the analysed code on this worksheet. The character strings detected as labels to translate are set on blue background. The associated module is put as comment of the cell.

Please be aware that TraducTeurk, which is a little bit uncouth, only takes account of the arguments that are present on the same line than the function... Avoid the line feeds !

3 Instruction for use

Basic : You only need to fill in the input and output folders and to follow the steps that are listed on the command worksheet.

4 The catalogs

Catalogues de traduction

The catalogs are generated in the output folder declared on the command worksheet. The thing left to do is to move or copy each catalog file in the _lang folder of its module.

5 How to get TraducTeurk ?

ToolOscope proposes to you a Shareware License :

For all this, please go to the User Space.

Don't modify this software, don't broadcast it : ToolOscope manages that.


© 2010-2015 by ToolOscope SASU. © 2016-2018 by Arnaud De Rette. All rights reserved