PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Internationalization » Translation2 » Bug #1769

Typo in example

Details

Submitted2004-07-02 06:44 UTC
Frommhavilah at hotmail dot com
Assignedquipo
StatusClosed
PackageTranslation2
PHP Version4.3.6
OSWinXP
Roadmaps(Not assigned)

Comments

[2004-07-02 06:44 UTC] mhavilah at hotmail dot com

Description:
------------
Third fallback language [german] is wrongly setup in example code, /Translation2/docs/examples/Translation2_example.php.

Error is on line 61.

Reproduce code:
---------------
/Translation2/docs/examples/Translation2_example.php
Line55.....:
// set an 'English Decorator', i.e. add English as a fallback language
\$tr = & \$tr->getDecorator('Lang');
\$tr->setOption('fallbackLang', 'en');

// add a 'German Decorator', i.e. add German as a third fallback language
\$tr = & \$tr->getDecorator('Lang');

// July2004-MiH Suggestion:
\$tr->setOption('fallbackLang', 'de');
// Original line follows...
// \$tr->setOption('fallbackLang', 'en');
EOT;
// ====================================================

Expected result:
----------------
German strings are third fallback after italian, then english.

Actual result:
--------------
Cut+Paste typo -- english is fallback two times.