[Typo3-dev] localization of EXT:feuser_admin

Martin Kutschker Martin.T.Kutschker at blackbox.net
Mon Sep 1 11:07:31 CEST 2003


Hi!

> In ext_typoscript_setup.txt I find this code:
>
> evalErrors {
> password.twice = You must enter the password twice.
> [snip]
> }

Are locallang.php-files the current recommended practice? If so I suggest the following additions to feuser_admin:

pi/class.tx_userfeadmin.php

require_once(PATH_tslib."media/scripts/fe_adminLib.inc");
class tx_user_feAdmin extends user_feAdmin {

var $pi;

function setPI(&$pi) {
$this->pi = $pi;
}

function getFailure($theField, $theCmd, $label) {
$pi->pi_getLL("evalErrors_$theField.$theCmd",$label);
}
}

pi/class.tx_feuseradmin_pi.php

require_once(PATH_tslib."class.tslib_pibase.php");
require_once("class.tx_userfeadmin.php");
class tx_glbspnkfeuserlist_pi1 extends tslib_pibase {

function main($content,$conf) {
$this->pi_loadLL();

$feadmin = new tx_user_feAdmin();
$feadmin->setPI($this);
$feadmin->init($content,$conf);
}
}

pi/locallang.php

$LOCAL_LANG = Array (
"default" = Array (
"evalErrors_password.twice" => "You must enter the password twice.",
"evalErrors_password.atLeast" => "There must be at least %s characters in your password!"
"evalErrors_email.email" => "The email address is not validly formed. Must contain @ and a domain."
"evalErrors_username.uniqueLocal" => "The username exists already. Please select another one."
"evalErrors_username.atLeast" => "There must be at least %s characters in your username!",
),
);

ext_typoscript_setup.txt should be changed to reflect the introduction of the new class.

If I'm correct these changes should ease the translation (on TER) of this extension.

Regards,
Masi 





More information about the TYPO3-dev mailing list