|
phpNuke - is a distributed under GNU/GPL
license Web-portals engine, written on PHP.
The given definition also is applicable to all other (see later) engines supported
by the given program. But originally the program was written for phpNuke therefore
it is named NukeLang.
One of features of phpNuke system is a possibility of fast switching the
interface of a portal into different languages. All text information for each
of languages is stored in the file with the name of sort lang-XXXXXX.php
(where XXXXXX - the name of the language, for example, english
for English or russian for Russian) in language subdirectory
and to translate the interface of a portal to other language enough to create
the new file with translation. In the further we shall name such file
language file.
To edit the language file it is possible in any text editor, however it is
rather inconvenient because of its large size. For example, at the moment of
writing this program the length of this file made about one and a half thousand
lines. For rise of convenience in operation of a translator just this program
also was created.
Other similar systems for creation of portals. They too are distributed under
license GNU/GPL, also are written on PHP but (for now) have less functions though
each of them is not deprived the snap. Also may be, that for a specific target
they will approach better, than phpNuke.
What NukeLang program does?
The program sequentially loads two files: the first with the initial English
text (though basically it is possible to use the file with any other language),
the second with the translated text and displays them as the table which it it
is possible to edit and in which the translated and not translated strings are
displayed by different colors (see Pic.1) and is possibility fast skip to
following not translated string (see Search of the strings).

Pic.1. The main window of the program with partial translated strings
for Russian (files in the format of version 5).
In the present moment two formats of files with translations are used: that
that was in versions up to 4 and the format which was entered into versions 5.
More precisely, both formats are simple text files with scripts on PHP, but in
5 versions it was accepted other structure of storage of text strings (which,
on idea, should provide the more speed of operation of the portal system).
The program correctly works (at least, tries) with both versions of files
with translations (see Pic.1 and 2).

Pic.2. The main window of the program with partial translated
strings for Russian (files in the format of version 4).
As may see the table consists of three columns: "Line #" - a line
number in the file for the given text; "Original" - the original
text; "Translated" - the translated text. The text which actually
is translated displayed by green color, and not translated - dark blue.
Algorithm of definition of color very simple - if strings in the second and
third columns differ, the text is considered translated.
How to work with the program
Loading of the file with translation
For the beginning operations it is necessary to load files with translation.
If you already have file with translation for your language it is necessary
to select "File" -> "Open" from menu (or to press
a combination Ctrl+N) if you start translation from zero that select
"File" -> "New" from menu (or to press a combination
Ctrl+O). In any case the program will ask you to specify the file with
the template for translation (see Pic.3). If you want to translate phpNuke version
4 it is necessary to select lang-TEMPLATE.php file, if 5
versions lang-english.php file.

Pic.3. The translation template select dialog window.
If before was selected "New" item from menu, on it loading is
completed and it is possible to start translation. If before was selected
"Open" - that the program also will ask to specify the file with
translation. After loading this file it is possible to start the translation.
Saving file with translation
For a saving file with translation in the same file from which it is loaded
it was necessary to select "File" -> "Save"
from menu (or to press a combination Ctrl+S). If the file was not
changed, this item is unavailable. For a saving file under other name it
is necessary to select "File" -> "Save as".
This item is accessible always.
Editing of the table
To change the text of translation, simply rise on this line and start text
entering. However, it is necessary to remember, that in this case input will
begin in I am empty string. Simply to correct the existing text it is necessary
to rise on this line and to press Enter (the text will be selected) and
to press any of cursor keys (the text back should become normal and should the
carriage of input will appear).
The similar effect can be achieved by mouse, sequentially three times having
clicked on the necessary line: the first click will make line current, the
second - to select the text and the third will return the text in edit mode,
and the carriage of input will stand on that place where have clicked the
mouse.
For fixing input it is enough to press Enter key or simply move to
other string.
Search of the strings.
For fast moving between lines intended four items in "Edit" menu:
"Find" searches entry of the given string (see below and Pic.4);
"Find again" item searches for the following entry; "Find
latin" locate the nearest not translated string and "Find missing"
locate the nearest absent string (the string available in the template of
translation, and absent in the file of translation).

Pic.4.The dialog box for search of a substring.
Search algorithm the following: if at the given substring there is one of
characters "*" or "?", it is accepted for a mask and the
string satisfying the given mask is searched. The character "*"
thus substitutes any quantity of characters (or their absence), and the
character "?" - just one character. If these characters in the
given substring are not present, its entry in the text is searched. Such mode
is cancelled if the last checkbox ("Use '*' and '?' symbols as ordinary
characters") checked. In this case always searched entry of the given
substring in the text. Assignments of other three switches, I hope, am clear
from their name.
Program options
At current time from options (items "Options"submenu) the grid
font options only accessible ("Font" item).
Program termination
For an exit from the program it is necessary to select "File"
-> "Exit" from menu or press combinations Alt+X or Alt+F4.
If the file with translation was changed, the program will ask for saving of
changes.
License for using and distribution
All copyrights to this program are exclusively owned by the author -
Irnis I.Haliullin.
This program may be freely distributed, provided the distribution package is
not modified. No person or company may charge a fee for the distribution of
this program without written permission from the copyright holder.
The contact information
If you have any comments or found errors in this program, please direct them
to: irnis@irnis.net.
The latest version of this program always can be found at: www.irnis.net.
|