[fw-general] Zend_Translate'd Zend_Validate messages for each language

2008-11-28 Thread
Hi all,

I have started using Zend_Form / Zend_Validate with Zend_Translate.
I notices that you need to redefine a lot of validation error messages
in your language.

It would be very helpful if there are default translation in many languages.
Can you find it anywhere?

If not, maybe I can prepare Japanese translation so Japanese people
can use it in the future if they can find it.
Any good place for that? (if no, i will just paste it on my own blog)

Thanks,

--
:: Iwasaki Teruyuki | atamasoft
:: twitter: twk | skype: iwasakiteruyuki


[fw-general] Zend_Tool document / command reference?

2008-10-16 Thread
I'm interested in Zend_Tool reading this article.
http://devzone.zend.com/article/3811-Using-Zend_Tool-to-start-up-your-ZF-Project

It seems there are some of zf {command} {parameters}.
Where can I find a list of them or documentation?  any source I should check?

Thanks,

-- 
:: Iwasaki Teruyuki
:: twitter: twk | skype: iwasakiteruyuki


[fw-general] How can I delete all Zend_Search_Lucene index files?

2008-06-14 Thread
Hi all,

I would like to delete Zend_Search_Lucene index files from the program.
The following is what I tried, but got exception.

$searchIndexDirectory = $searchIndex-getDirectory();
foreach ($searchIndexDirectory-fileList() as $file)
{
if ($searchIndexDirectory-fileExists($file))
$searchIndexDirectory-deleteFile($file);
}
$searchIndex-commit();

Fatal error: Ignoring exception from Zend_Search_Lucene::__destruct()
while an exception is already active (Uncaught Zend_Search_Lucene_Exception
in Zend\Search\Lucene\Storage\File\Filesystem.php on line 59)

I'm using ZF1.5.2.
Any good way to do?

-- 
:: Iwasaki Teruyuki | http://atamasoft.com/
:: twitter: twk | skype: iwasakiteruyuki


[fw-general] How to escape '%' in LIKE query with Zend_Db?

2008-02-14 Thread
Hi, all.

I am using Zend_Db (1.0.3) and wondering how I should escape '%'
character in the LIKE query.

The right way I think for the legacy functions is something like the following.

$text = '100%ok';
$escaped_text = mysql_real_escape_string($text);
$wcard_escaped_text = mb_ereg_replace('([%_])', '1',
$escaped_text); // multibyte-safe
$sql .=  content LIKE '% . $wcard_escaped_text . %';

The following works but only on MySQL, and it does not seem the Zend_Db way.

$text = '100%ok';
$escaped_text = mysqli_real_escape_string($db-getConnection(), $text);
$wcard_escaped_text = mb_ereg_replace('([%_])', '1', $escaped_text);
$sql .=  content LIKE '% . $wcard_escaped_text . %';

Any better way?

-- 
twk
// [EMAIL PROTECTED]
// http://nonn-et-twk.net/twk/