You can define your own language files. For example if you are using Russian,
you should create a phplens/phplens-lang-ru.inc.php file based on
phplens/phplens-lang-en_us.inc.php.
Then modify the following line in the phplens/config/phplens.config.inc.php file to use those language files. Change the following line from:
define(PHPLENS_LANG_DEFAULT,'en_us');
to
define(PHPLENS_LANG_DEFAULT,'ru');
You can also modify the images in the phplens/img directory to control the look and feel of the screens. If you don't want to overwrite the default images, you can modify the <img src> tags in the language file. You might also want to change the image dimensions. The relevant lines in the phplens-lang-en_us.inc.php are documented here:
var $dynEditIcon = '<img src="$PHPLENS_PATH/img/editbtn.gif" border=0 alt="phpLens Settings">'; var $dynEditColIcon = '<img src="$PHPLENS_PATH/img/editcol.gif" border=0 alt="Column Settings">'; var $dynEditTabIcon = '<img src="$PHPLENS_PATH/img/edittab.gif" border=0 alt="Choose Visible Columns">'; var $menuPrev = '<img src="$PHPLENS_PATH/img/prev.gif" width=20" height=20 border=0 alt=Previous>'; var $menuNext = '<img src="$PHPLENS_PATH/img/next.gif" width=20" height=20 border=0 alt=Next>'; var $menuBegin = '<img src="$PHPLENS_PATH/img/begin.gif" width=20 height=20 border=0 alt=Begin>'; var $menuEnd = '<img src="$PHPLENS_PATH/img/end.gif" width=20 height=20 border=0 alt=End>'; var $menuFilter = '<img src="$PHPLENS_PATH/img/filter.gif" width=20 height=20 border=0 alt=Search>'; var $menuFilterReset = '<img src="$PHPLENS_PATH/img/filterreset.gif" width=20 height=20 border=0 alt="Reset Search">'; var $menuClear = '<img src="$PHPLENS_PATH/img/dot.gif" width=20 height=20 border=0>'; var $menuNew = '<img src="$PHPLENS_PATH/img/new.gif" width=20 height=20 border=0 alt="New Record">'; var $iconDel = '<img src="$PHPLENS_PATH/img/del.gif" width=13 height=13 alt=Delete border=0>'; var $iconEdit = '<img src="$PHPLENS_PATH/img/edit.gif" width=17 height=15 alt=Edit border=0>';
The phpLens dynamic editor text is stored in the phplens-lang-edit.inc.php file.
You can define your own pre-defined color schemes by modifying the phplens/img/phplens-js-styles.js file. To add a new scheme, add a new element to the PHPLENS_styles[] array. The javascript code will autodetect the change in array length.
$lens->htmlLens = '*';If you only want to handle multi-byte characters for selected columns, set:
$lens->htmlLens = 'col1;col2';
You will still have to send the meta content tag yourself at the beginning of your web page. For example for UTF-8:
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=UTF-8">
When you are creating or editing a record in phpLens, some fields might contain passwords and you might not want to display them on the screen. We use the following property $lens->lang->txtMatchPassword to identify which fields are actually password fields, and instead of displaying the text of the fields, we display ***** instead.
If the txtMatchPassword matches the text caption of the field (the caption defined in nameLens), then we set the input type to <input type=password...> instead of <input type=text...>. Matching is case-insensitive.
So in English,
$lens->lang->txtMatchPassword = 'password';
will match the following captions in your data entry form "Enter Password", "Fill in your password" or "PASSWORD ENTRY:".
Since phpLens 2.6, you can dynamicly modify the language setting using the SetLang function. For example, you might have a language file phplens-lang-fr.inc.php. You can set this language using:
$lens = new PHPLens(...);
$lens->SetLang('fr'); // will include_once this file if located in PHPLENS_DIR.
$lens->Render();
Or if you are using applets you can put in the $lens->overrideFunction (the SetLensApplet_$id function).
If the language string length is greater than 6 characters, then we assume that a full file path is being passed to SetLang().
$PHPLENS_CHARSET = 'gb2312'; # simplified chinese gb encoding