Pierre,

what's your problem ???

Zend_Translate does not convert any input.
When your source is ISO then Zend_Translate will also return ISO.
When your source is kyrillic it will return kyrillic and visa versa.

Can you explain where your problem with Zend_Translate is ?
Have you tried to translate your messages manually ?
Does this work ?
What's the input, what's the output, what've you expected, what've you tried, which release are u using and and and...

Without any further informations your mail is quite useless from the point of a helping hand.

Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com

----- Original Message ----- From: "Spring Pierre" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, June 10, 2008 4:01 PM
Subject: [fw-general] Zend_Translate in iso-8859-1

hi all,

before i get into the core of my problem, i'd like to point out that
switching to UTF-8 is not a solution for my problem, taken that i
merely add a roof to a card-house ...

the server i work on (some intraweb behind a vpn) sends resposne
headers set to iso-8859-1, as is the <meta> tag.

i build a Zend_Form and need the validation messages to be translated.

i wrote an xml file with the error messages [1]. i tried both, an
iso-8859-1 and utf-8 version of the xml file.

i then attach the translation to the form and render it. cf. [2]

i seem to have a problem with encoding though.

does this ring a bell to anyone?

greetings ... pierre

== links
[1] http://wiki.caillou.ch/_media/code:validatorsstrings.g.xml
[2] http://paste2.org/p/37728 for syntax highlighted
== code
$this->form->setAction('.')
    ->setMethod('post')
    ->setAttrib('enctype', 'multipart/form-data');

# set the translator
$translator = new Zend_Translate(
    'Zend_Translate_Adapter_Tmx',
    $translation_file,
    'de'
);
$this->form->setTranslator($translator);

# add some elements
# [...]

if ($_POST) {
    $form->isValid($_POST);
}

$view = new Zend_View();
$view->setEncoding('ISO-8859-1');

echo  $form->render($view);
--
Liip AG // Rte de la Fonderie 7 // CH-1700 Fribourg
Fon 026 4222511 // Key id 0x5BF5F8FA // www.liip.ch





Reply via email to