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_Filter_Transliteration
{zone-data}

{zone-data:proposer-list}
[Martin Hujer|mailto:mhujer@gmail.com]
[Alexander Veremyev (Zend Liaison)|~alexander]
{zone-data}

{zone-data:revision}
1.0 - 29th January 2008: Initial proposal
1.1 - 8th Aptil 2008: Proposal update
{zone-data}

{zone-data:overview}
Zend_Filter_Transliteration is a component that transliterates utf8 strings into ASCII.
{zone-data}

{zone-data:references}
* [PHP.net - iconv|http://php.net/iconv]
{zone-data}

{zone-data:requirements}
* This filter *must* correctly transliterate any utf8 string into ASCII version
{zone-data}

{zone-data:dependencies}
* Zend_Filter_Interface
{zone-data}

{zone-data:operation}
...
{zone-data}

{zone-data:milestones}
* Milestone 1: \[DONE\] Finalize this proposal
* Milestone 2: \[DONE\] Working prototype checked into the http://zfdev.googlecode.com/svn/trunk/ZendFilterTransliteration/
* Milestone 3: \[DONE\] Unit tests exist, work, and are checked into SVN.
* Milestone 4: Community and Zend review
{zone-data}

{zone-data:class-list}
Zend_Filter_Transliteration
{zone-data}

{zone-data:use-cases}
{composition-setup}

{deck:id=use-cases1}

{card:label=UC 1: Czech characters}
{code:type=php}
<?php
$text = "?š??žýáíé?ú";
$filter = new Zend_Filter_Transliteration();
echo $filter->filter(text); //prints "escrzyaieuu";
{code}
{card}

{card:label=UC 2: German characters}
{code:type=php}
<?php
$text = "äëïöü";
$filter = new Zend_Filter_Transliteration();
echo $filter->filter(text); //prints 'aeiou';
{code}
{card}

{card:label=UC 3: French characters}
{code:type=php}
<?php
$text = "âêîôûÂÊÎÔÛœæŸÇç";
$filter = new Zend_Filter_Transliteration();
echo $filter->filter(text); //prints 'aeiouAEIOUoeoeYCc';
{code}
{card}

{deck}
{zone-data}

{zone-data:skeletons}
{code}
class Zend_Filter_Transliteration implements Zend_Filter_Interface
{
public function filter ($s) {}
}

{code}
{zone-data}

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