1
我在 application/config目錄下具有translate.tr,translate.en,translate.fr文件。我用過如何在ini文件中爲zend翻譯添加csv文件
$translate = new Zend_Translate('csv', '../application/configs/translate.tr', 'tr');
$writer = new Zend_Log_Writer_Stream('../docs/translate.txt');
$logger = new Zend_Log($writer);
$translate->setOptions(array('log' => $logger, 'logUntranslated' => true));
$translate->addTranslation('../application/configs/translate.en', 'en');
$translate->addTranslation('../application/configs/translate.fr', 'fr');
現在我想用application.ini文件來處理初始化。所以
resources.translate.registry_key = "Zend_Translate"
resources.translate.adapter = "csv"
resources.translate.options.logUntranslated = true
resources.translate.options.scan = "directory"
resources.translate.options.disableNotices = 1
;resources.translate.options.logfile = APPLICATION_PATH "../docs/translate.txt"
resources.translate.data = APPLICATION_PATH "/../data/languages"
resources.translate.locale = "tr" ; default language
我想我現在需要證明的Zend知道在哪裏這些CSV文件駐留。我如何顯示它?
你的意思是CVS或CSV?請更正您的標題。 – Shikiryu 2010-11-04 09:09:31
你知道什麼是「併發版本系統」和「逗號分隔值」嗎? – nerkn 2010-11-04 09:22:28