[Solar-talk] Localize Forms / Filters

Tobias Nix tobias.nix at paupau.org
Wed Jan 2 06:16:05 CST 2008


Hello list,

i try to localize my forms. the setup looks like this:

$form = Solar::factory('Solar_Form');
$form->setElement('postcode' => array(
	'type' => 'text',
	'label' => $this->locale('LABEL_POSTCODE'),
	'value' => Solar::config('Vendor_App_Example', 'postcode', 50500),
	'attribs' => array('maxlength' => 5, 'size' => 5),
	'required' => true,
	'filters' => array(
		'sanitizeTrim',
		array('validateRangeLength', 5,5),
		'validateNumeric',
	),
	'descr' => $this->locale('DESCR_POSTCODE'),
));

How can i localize form and filter feedback like INVALID_NUMERIC,
FAILURE_FORM, SUCCESS_FORM, ...?

Tried to set INVALID_NUMERIC in /vendor/App/Example/locale/de_DE.php
without success

Is it possible to define this in $form->setElement() somehow?


-- 
# Tobias Nix
# +49 173 513 866 1
# http://www.xing.com/profile/Tobias_Nix/


More information about the Solar-talk mailing list