View Source

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[{zone-template-instance:ZFDEV:Zend Proposal Zone Template}



1.0 - 3 November 2007: Finished initial proposal

Zend_Translate_Yaml is an additional adapter for Zend_Translate which adds the YAML Format as translation source. YAML is easy to maintain and offers therefor advantage for customers.

* none

* Zend_Translate_Adapter_Yaml is an additional source format for Zend_Translate
* It will integrate the useage of Yaml files for translation into the Zend_Framework
* This component can not create new Yaml files, it only can parse them for framework integration

* Zend_Translate_Abstract
* Zend_Exception

This component integrates Yaml source files into the Zend_Framework.
It derives from Zend_Translate_Abstract and can be used by Zend_Translate to serve source files for translation.

Yaml Files are simple from the point of creation.
They can be processed by customers with a simple text editor.

* Milestone 1: \[DONE\] proposal written
* Milestone 2: \[DONE\] [Zend_Translate - Thomas Weidner]
* Milestone 3: Code class based on Zend_Translate_Abstract
* Milestone 4: Unit tests and debugging
* Milestone 5: Documentation done

* Zend_Translate_Adapter_Yaml

Use of translation - HTTP_ACCEPT_LANGUAGE: de_AT
$source = new Zend_Translate_Adapter_Yaml('C:\translate\de\page.yml');
$lang = new Zend_Translate($source);
print $lang->_('Do you speak german ?'); // Prints: Sprichst Du deutsch ?

Example yaml file:
Somewhat:Irgendwas #some description
Other things:Andere Dinge
Do you speak german ?:Sprechen Sie Deutsch ?
"Comment with :colon":"Kommentar mit :Doppelpunkt"

class Zend_Translate_Adapter_Yaml extends Zend_Translate_Abstract