View Source

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

{zone-data:component-name}
Zend_Translate_Adapter_Ini
{zone-data}

{zone-data:proposer-list}
* [~thomas]
** Team lead and main author of Zend_Translate
* [Matthew Weier O'Phinney (Zend Liaison)|~matthew]
{zone-data}

{zone-data:revision}
1.0 - 26 September 2007: New source integration for Zend_Translate.
{zone-data}

{zone-data:overview}
Zend_Translate_Adapter_Ini is an additional source integration for the core component Zend_Translate.
{zone-data}

{zone-data:references}
* none
{zone-data}

{zone-data:requirements}
* Zend_Translate_Adapter_Ini is an additional source format for Zend_Translate
* It will integrate the useage of Ini files for translation into the Zend_Framework
* This component can not create new Ini files, it only can parse them for framework integration
{zone-data}

{zone-data:dependencies}
* Zend_Translate_Abstract
* Zend_Exception
{zone-data}

{zone-data:operation}
This component integrates Ini 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.

Ini Files are simple from the point of creation.
They can be processed by customers with a simple text editor.
{zone-data}

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

{zone-data:class-list}
* Zend_Translate_Adapter_Ini
{zone-data}

{zone-data:use-cases}
Use of translation - HTTP_ACCEPT_LANGUAGE: de_AT
{code}
$source = new Zend_Translate_Adapter_Ini('C:\translate\de\page.ini');
$lang = new Zend_Translate($source);
print $lang->_('Do you speak german ?'); // Prints: Sprichst Du deutsch ?
{code}
{zone-data}

{zone-data:skeletons}
{code}
class Zend_Translate_Adapter_Ini extends Zend_Translate_Abstract
{
}
{code}

Example Ini File:
{code}
[translation for page1]
my.original.source = "Translation"
another.source = "Second Translation"

"possible source" = "real translation"
{code}
{zone-data}

{zone-template-instance}]]></ac:plain-text-body></ac:macro>