Hi,

I have a TMX based translation and I'm using the new View Helper for
translate text in View scripts.

However, if I have some HTML in translated text I've this error:

Warning: vsprintf() [function.vsprintf]: Too few arguments in
/usr/local/www/apache22/Library/ZendFramework15/library/Zend/View/Helper/Translate.php
on line 89

This is because in my HTML I have a table with 'width="100%"' and the
function vsprintf try to substitute the content of the string (with the %),
but without any other params the function raise a Warning.

This is my workaround:

In Zend/View/Helper/Translate.php on line 89 instead of:

return vsprintf($message, $options);

now it is:

if (count($options)==0) {
   return $message;
} else {
    return vsprintf($message, $options);
}

Is this modification correct? Can be included in current library?
Or is not possible to insert HTML in a TMX file? If not, what's an
alternative?



-- 
View this message in context: 
http://www.nabble.com/Zend_View_Helper_Translate-problem-with-HTML-in-translated-text-tp15716917s16154p15716917.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to